Part Number Hot Search : 
SC24115W FGM623S MMBD7 RGP15A 17000 D4448 20M126 PTF10112
Product Description
Full Text Search
 

To Download W83977EG Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 WINBOND ISA I/O W83977EF W83977EG
W83977EF-AW/W83977EG-AW
Revision History
PAGES DATES VERSION VERSION ON WEB MAIN CONTENTS
1 2 3 4
n.a. P86~P110 n.a.
12/30/03 03/07/03 04/25/03 04/25/06
Remove W83977CTF Part Update the new version on web Add Chapter 10 Configuration Register Add Pb-free part no:W83977EG
LIFE SUPPORT APPLICATIONS
These products are not designed for use in life support appliances, devices, or systems where malfunction of these products can reasonably be expected to result in personal injury. Winbond customers using or selling these products for use in such applications do so at their own risk and agree to fully indemnify Winbond for any damages resulting from such improper use or sales.
-I-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
Tables of Contents1. 2. 3. 4. GENERAL DESCRIPTION ......................................................................................................... 5 FEATURES ................................................................................................................................. 6 PIN CONFIGURATION ............................................................................................................... 8 PIN DESCRIPTION.................................................................................................................... 9 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5. 5.1 Host Interface ................................................................................................................. 9 General Purpose I/O Port ............................................................................................. 11 Serial Port Interface ...................................................................................................... 11 Infrared Interface .......................................................................................................... 12 Multi-Mode Parallel Port ............................................................................................... 13 FDC Interface ............................................................................................................... 17 KBC Interface................................................................................................................ 18 POWER PINS ............................................................................................................... 18 ACPI Interface............................................................................................................... 18 W83977EF/EG FDC ..................................................................................................... 19
5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 AT interface ..................................................................................................................19 FIFO (Data) ..................................................................................................................19 Data Separator .............................................................................................................20 Write Precompensation ................................................................................................20 Perpendicular Recording Mode ....................................................................................20 FDC Core .....................................................................................................................21 FDC Commands...........................................................................................................21 Status Register A (SA Register) (Read base address + 0)...........................................32 Status Register B (SB Register) (Read base address + 1)...........................................34 Digital Output Register (DO Register) (Write base address + 2) ..................................36 Tape Drive Register (TD Register) (Read base address + 3).......................................36 Main Status Register (MS Register) (Read base address + 4).....................................37 Data Rate Register (DR Register) (Write base address + 4) ........................................37 FIFO Register (R/W base address + 5) ........................................................................39 Digital Input Register (DI Register) (Read base address + 7).......................................41 Configuration Control Register (CC Register) (Write base address + 7) ......................42
FDC FUNCTIONAL DESCRIPTION ......................................................................................... 19
5.2
Register Descriptions.................................................................................................... 32
5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9
6.
UART PORT ............................................................................................................................. 44 6.1 6.2 Universal Asynchronous Receiver/Transmitter (UART A, UART B) ............................ 44 Register Address .......................................................................................................... 44
6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 UART Control Register (UCR) (Read/Write) ................................................................44 UART Status Register (USR) (Read/Write) ..................................................................47 Handshake Control Register (HCR) (Read/Write) ........................................................48 Handshake Status Register (HSR) (Read/Write)..........................................................48 UART FIFO Control Register (UFR) (Write only)..........................................................49
-II-
W83977EF-AW/W83977EG-AW
6.2.6 6.2.7 6.2.8 6.2.9 Interrupt Status Register (ISR) (Read only) ..................................................................50 Interrupt Control Register (ICR) (Read/Write) ..............................................................51 Programmable Baud Generator (BLL/BHL) (Read/Write).............................................51 User-defined Register (UDR) (Read/Write) ..................................................................52
7.
PARALLEL PORT .................................................................................................................... 53 7.1 7.2 Printer Interface Logic................................................................................................... 53 Enhanced Parallel Port (EPP) ...................................................................................... 54
7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.2.6 7.2.7 7.2.8 Data Swapper...............................................................................................................55 Printer Status Buffer .....................................................................................................55 Printer Control Latch and Printer Control Swapper.......................................................56 EPP Address Port ........................................................................................................56 EPP Data Port 0-3 ........................................................................................................57 Bit Map of Parallel Port and EPP Registers..................................................................57 EPP Pin Descriptions ...................................................................................................58 EPP Operation .............................................................................................................58 ECP Register and Mode Definitions .............................................................................59 Data and ecpAFifo Port ................................................................................................60 Device Status Register (DSR) ......................................................................................60 Device Control Register (DCR).....................................................................................61 CFIFO (Parallel Port Data FIFO) Mode = 010 ..............................................................62 ECPDFIFO (ECP Data FIFO) Mode = 011...................................................................62 TFIFO (Test FIFO Mode) Mode = 110..........................................................................62 CNFGA (Configuration Register A) Mode = 111...........................................................62 CNFGB (Configuration Register B) Mode = 111...........................................................62 ECR (Extended Control Register) Mode = all ...............................................................63 Bit Map of ECP Port Registers .....................................................................................64 ECP Pin Descriptions ...................................................................................................65 ECP Operation .............................................................................................................66 FIFO Operation ............................................................................................................66 DMA Transfers .............................................................................................................67 Programmed I/O (NON-DMA) Mode.............................................................................67
7.3
Extended Capabilities Parallel (ECP) Port ................................................................... 59
7.3.1 7.3.2 7.3.3 7.3.4 7.3.5 7.3.6 7.3.7 7.3.8 7.3.9 7.3.10 7.3.11 7.3.12 7.3.13 7.3.14 7.3.15 7.3.16
7.4 7.5 8. 8.1 8.2 8.3 8.4 8.5
Extension FDD Mode (EXTFDD).................................................................................. 67 Extension 2FDD Mode (EXT2FDD).............................................................................. 67 Output Buffer................................................................................................................. 68 Input Buffer ................................................................................................................... 68 Status Register ............................................................................................................. 69 Commands.................................................................................................................... 70 Hardware GATEA20/Keyboard Reset Control Logic................................................... 71
8.5.1 8.5.2 KB Control Register (Logic Device 5, CR-F0)...............................................................71 Port 92 Control Register (Default Value = 0x24) ..........................................................72
KEYBOARD CONTROLLER .................................................................................................... 68
-III-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
8.6 OnNow / Security Keyboard and Mouse Wake-Up ...................................................... 73
8.6.1 8.6.2 8.6.3 Keyboard Wake-Up Function........................................................................................73 Keyboard Password Wake-Up Function .......................................................................73 Mouse Wake-Up Function ............................................................................................73
9.
GENERAL PURPOSE I/O......................................................................................................... 74 9.1 9.2 Basic I/O functions........................................................................................................ 76 Alternate I/O Functions ................................................................................................. 78
9.2.1 9.2.2 9.2.3 9.2.4 Interrupt Steering..........................................................................................................78 Watch Dog Timer Output..............................................................................................78 Power LED ...................................................................................................................79 General Purpose Address Decoder..............................................................................79
10.
PLUG AND PLAY CONFIGURATION ...................................................................................... 80 10.1 Compatible PnP............................................................................................................ 80
10.1.1 Extended Function Registers........................................................................................80 10.1.2 Extended Functions Enable Registers (EFERs) ...........................................................81 10.1.3 Extended Function Index Registers (EFIRs), Extended Function Data Registers(EFDRs) .......................................................................................................................81
10.2
Configuration Sequence ............................................................................................... 81
10.2.1 10.2.2 10.2.3 10.2.4 Enter the extended function mode................................................................................81 Configurate the configuration registers.........................................................................82 Exit the extended function mode ..................................................................................82 Software programming example...................................................................................82
11. 12.
ACPI REGISTERS FEATURES................................................................................................ 83 CONFIGURATION REGISTER ................................................................................................ 84 12.1 12.2 12.3 12.4 12.5 12.6 12.7 12.8 12.9 Chip (Global) Control Register ..................................................................................... 84 Logical Device 0 (FDC)................................................................................................. 90 Logical Device 1 (Parallel Port) .................................................................................... 94 Logical Device 2 (UART A)) ....................................................................................... 95 Logical Device 3 (UART B)........................................................................................... 95 Logical Device 5 (KBC)................................................................................................. 97 Logical Device 7 (GP I/O Port I) ................................................................................... 98 Logical Device 8 (GP I/O Port II) ................................................................................ 101 Logical Device A (ACPI) ............................................................................................. 105 Absolute Maximum Ratings ........................................................................................ 112 DC CHARACTERISTICS............................................................................................ 112 AC Characteristics ...................................................................................................... 116
13.3.1 13.3.2 13.3.3 13.3.4 FDC: Data rate = 1 MB, 500 KB, 300 KB, 250 KB/sec. ..............................................116 UART/Parallel Port .....................................................................................................118 Parallel Port Mode Parameters...................................................................................118 EPP Data or Address Read Cycle Timing Parameters...............................................119
13.
SPECIFICATIONS .................................................................................................................. 112 13.1 13.2 13.3
-IV-
W83977EF-AW/W83977EG-AW
13.3.5 13.3.6 13.3.7 13.3.8 13.3.9 13.3.10 13.3.11 EPP Data or Address Write Cycle Timing Parameters ...............................................120 Parallel Port FIFO Timing Parameters........................................................................121 ECP Parallel Port Forward Timing Parameters ..........................................................121 ECP Parallel Port Reverse Timing Parameters ..........................................................121 KBC Timing Parameters.............................................................................................122 GPIO Timing Parameters ...........................................................................................123 Keyboard/Mouse Timing Parameters .........................................................................123
14.
TIMING WAVEFORMS ........................................................................................................... 124 14.1 14.2 14.3 14.1 FDC..................................................................................................................... 124 UART/Parallel ............................................................................................................. 125
14.2.1 14.3.1 14.3.2 14.3.3 14.3.4 14.3.5 14.3.6 14.3.7 14.3.8 Modem Control Timing ...............................................................................................126 Parallel Port Timing ....................................................................................................127 EPP Data or Address Read Cycle (EPP Version 1.9) ................................................128 EPP Data or Address Write Cycle (EPP Version 1.9).................................................129 EPP Data or Address Read Cycle (EPP Version 1.7) ................................................130 EPP Data or Address Write Cycle (EPP Version 1.7).................................................131 Parallel Port FIFO Timing ...........................................................................................131 ECP Parallel Port Forward Timing..............................................................................132 ECP Parallel Port Reverse Timing..............................................................................132 Write Cycle Timing .....................................................................................................133 Read Cycle Timing .....................................................................................................133 Receive Data from K/B ...............................................................................................134 Input Clock .................................................................................................................134 Send Data to Mouse...................................................................................................134 Receive Data from Mouse ..........................................................................................134 Master Reset (MR) Timing .........................................................................................135
Parallel Port ................................................................................................................ 127
14.4
KBC............................................................................................................................. 133
14.4.1 14.4.2 14.4.3 14.4.4 14.4.5 14.4.6
14.5 14.6 15. 15.1 15.2 15.3 16. 17. 18.
GPIO Write Timing Diagram ....................................................................................... 135
14.5.1
Keyboard/Mouse Wake-up Timing ............................................................................. 135 Parallel Port Extension FDD ....................................................................................... 136 Parallel Port Extension 2FDD ..................................................................................... 137 Four FDD Mode .......................................................................................................... 137
APPLICATION CIRCUITS ...................................................................................................... 136
ORDERING INFORMATION .................................................................................................. 138 HOW TO READ THE TOP MARKING.................................................................................... 138 PACKAGE DIMENSIONS ....................................................................................................... 139
-V-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
1. GENERAL DESCRIPTION
W83977EF/EG is an evolving product from Winbond's most popular I/O chip W83877F --- which integrates the disk drive adapter, serial port (UART), IrDA 1.0 SIR, parallel port, configurable plugand-play registers for the whole chip --- plus additional powerful features: ACPI, 8042 keyboard controller with PS/2 mouse support, 14 general purpose I/O ports, full 16-bit address decoding, OnNow keyboard Wake-Up, OnNow mouse Wake-Up. The disk drive adapter functions of W83977EF/EG include a floppy disk drive controller compatible with the industry standard 82077/ 765, data separator, write pre-compensation circuit, decode logic, data rate selection, clock generator, drive interface control logic, and interrupt and DMA logic. The wide range of functions integrated onto the W83977EF greatly reduces the number of components required for interfacing with floppy disk drives. The W83977EF supports four 360K, 720K, 1.2M, 1.44M, or 2.88M disk drives and data transfer rates of 250 Kb/s, 300 Kb/s, 500 Kb/s,1 Mb/s, and 2 Mb/s. W83977EF/EG provides two high-speed serial communication ports (UARTs), one of which supports serial Infrared communication. Each UART includes a 16-byte send/receive FIFO, a programmable baud rate generator, complete modem control capability, and a processor interrupt system. Both UARTs provide legacy speed with baud rate up to 115.2k bps and also advanced speed with baud rates of 230k, 460k, or 921k bps which support higher speed modems. W83977EF/EG supports one PC-compatible printer port (SPP), Bi-directional Printer port (BPP) and also Enhanced Parallel Port (EPP) and Extended Capabilities Port (ECP). Through the printer port interface pins, also available are: Extension FDD Mode and Extension 2FDD Mode allowing one or two external floppy disk drives to be connected. The configuration registers support mode selection, function enable/disable, and power down function selection. Furthermore, the configurable PnP features are compatible with the plug-and-play feature TM demand of Windows 95 , which makes system resource allocation more efficient than ever. W83977EF/EG provides functions that complies with ACPI (Advanced Configuration and Power Interface), which includes support of legacy and ACPI power management through SMI or SCI function pins. W83977EF/EG also has auto power management to reduce power consumption. The keyboard controller is based on 8042 compatible instruction set with a 2K Byte programmable TM ROM and a 256-Byte RAM bank. Keyboard BIOS firmware are available with optional AMIKEY -2, TM Phoenix MultiKey/42 , or customer code. W83977EF/EG provides a set of flexible I/O control functions to the system designer through a set of General Purpose I/O ports. These GPIO ports may serve as simple I/O or may be individually configured to provide a predefined alternate function. W83977EF/EG also supports Power-loss control, and makes the system never miss to detect any TM Wake-Up event provided by the chipset such as INTEL PIIX4 . W83977EF is made to fully comply with Microsoft PC98 Hardware Design Guide. IRQs, DMAs, and I/O space resource are flexible to adjust to meet ISA PnP requirement. Moreover W83977EF/EG is made to meet the specification of PC98's requirement in the power management: ACPI and DPM (Device Power Management). Another benifit is that W83977EF/EG is of the same pin assignment of W83977AF, W83977F, W83977TF, W83977ATF. Thus makes the design very flexible.
-5-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
2. FEATURES
General Plug & Play 1.0A compatible Support 12 IRQs, 4 DMA channels, full 16-bit address decoding Capable of ISA Bus IRQ Sharing Compliant with Microsoft PC98 Hardware Design Guide Support DPM (Device Power Management), ACPI Report ACPI status interrupt by SCI# signal issued from any of the 12 IQRs pins or GPIO xx Programmable configuration settings single 24/48 Mhz clock input FDC Compatible with IBM PC AT disk drive systems Variable write pre-compensation with track selectable capability Support vertical recording format DMA enable logic 16-byte data FIFOs Support floppy disk drives and tape drives Detects all overrun and underrun conditions Built-in address mark detection circuit to simplify the read electronics FDD anti-virus functions with software write protect and FDD write enable signal (write data signal was forced to be inactive) Support up to four 3.5-inch or 5.25-inch floppy disk drives Completely compatible with industry standard 82077 360K/720K/1.2M/1.44M/2.88M format; 250K, 300K, 500K, 1M, 2M bps data transfer rate Support 3-mode FDD, and its Win95 driver UART Two high-speed 16550 compatible UARTs with 16-byte send/receive FIFOs MIDI compatible Fully programmable serial-interface characteristics: --- 5, 6, 7 or 8-bit characters --- Even, odd or no parity bit generation/detection --- 1, 1.5 or 2 stop bits generation Internal diagnostic capabilities: --- Loop-back controls for communications link fault isolation --- Break, parity, overrun, framing error simulation Programmable baud generator allows division of 1.8461 Mhz and 24 Mhz by 1 to (216-1) Maximum baud rate up to 921k bps for 14.769 Mhz and 1.5M bps for 24 Mhz
-6-
W83977EF-AW/W83977EG-AW
Infrared Support IrDA version 1.0 SIR protocol with maximum baud rate up to 115.2K bps Support SHARP ASK-IR protocol with maximum baud rate up to 57,600 bps Parallel Port Compatible with IBM parallel port Support PS/2 compatible bi-directional parallel port Support Enhanced Parallel Port (EPP) - Compatible with IEEE 1284 specification Support Extended Capabilities Port (ECP) - Compatible with IEEE 1284 specification Extension FDD mode supports disk drive B; and Extension 2FDD mode supports disk drives A and B through parallel port Enhanced printer port back-drive current protection Keyboard Controller 8042 based with optional F/W from AMIKKEY
TM
-2, Phoenix MultiKey/42
TM
or customer code
With 2K bytes of programmable ROM, and 256 bytes of RAM Asynchronous Access to Two Data Registers and One status Register Software compatibility with the 8042 and PC87911 microcontrollers Support PS/2 mouse Support port 92 Support both interrupt and polling modes Fast Gate A20 and Hardware Keyboard Reset 8 Bit Timer/ Counter Support binary and BCD arithmetic 6MHz, 8 MHz, 12 MHz, or 16 MHz operating frequency General Purpose I/O Ports 14 programmable general purpose I/O ports; 6 dedicate, 8 optional General purpose I/O ports can serve as simple I/O ports, interrupt steering inputs, watching dog timer output, power LED output, infrared I/O pins, general purpose address decoder, KBC control I/O pins OnNow Funtions Keyboard Wake-Up by programmable keys Mouse Wake-Up by programmable buttons Package 128-pin PQFP
-7-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
3. PIN CONFIGURATION
P PA P AN W NS S W SR WO MC IU IT NT #L # ## III /G // / R R RI I I I I I I G G GMK / / Q Q Q R R R R R R RA V A A A A V A P PV P 1 1 1 Q Q Q Q Q Q N Q1 S 1 1 1 1 C 1 A A A A A A A A A A 2 2 S P 2 C C R R 2 1 0 1 3 4 5 6 7 C 9 5 S 4 3 2 1 C0 9 8 7 6 5 4 3 2 1 0 3 2 B 2 0 L L I I 1 KKB A
11 1 99 9 9 999 99 9 88 888 888 8 877 77 7777 7 766 66 6 00 0 98 7 6 543 21 0 98 765 432 1 098 76 5432 1 098 76 5 21 0 IRQ14/GP14 IRQ15/GP15 IOR# IOW# AEN IOCHRDY D0 D1 D2 D3 D4 D5 VCC D6 D7 MR DACK0#/GP16 VSS SCI#/DRQ0/GP17 DACK1# DRQ1 DACK2# DRQ2 DACK3# DRQ3 TC 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 1 1 1 1 1 1 1 1 1 12 2 22 2 2 2 2 2 2 3 33 3 3 33 33 1 2 3 4 5 67 8 9 0 1 2 3 4 5 6 7 8 90 1 23 4 5 6 7 8 9 0 12 3 4 56 78 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 VBAT XTAL1 VSS XTAL2 MDATA KDATA KBLOCK/GP13 KBRST/GP12 GA20/GP11 VCC DCDB# SOUTB/PEN48 SINB DTRB# RTSB DSRB# CTSB# DCDA# SOUTA/PENKBC SINA DTRA#/PNPCSV# RTSA#/HEFRAS DSRA# CTSA# CIRRX/GP24 SUSCIN#/GP25
C D D/ / / / / / / / / / / / / / S P V B / PP V P P P P P P / / / / / I I L R R D H R W T WW S D M D D M I L E C U A D D S D D D D D D S I E A S R R K V V S E DP R E D T I O S S O NC C S C 7 6 S 5 4 3 2 1 0 L N R F T R T I I RD B X X E R B A B A DT YK I D DK A A A E NT P NE E CD T K X N NH A 0 0 1G , G P 1 0 , / S C I
-8-
W83977EF-AW/W83977EG-AW
4. PIN DESCRIPTION
Note: Please refer to Section 11.2 DC CHARACTERISTICS for details. I/O6t I/O8t I/O8 I/O12t I/O12 I/O16u - TTL level bi-directional pin with 6 mA source-sink capability - TTL level bi-directional pin with 8 mA source-sink capability - CMOS level bi-directional pin with 8 mA source-sink capability - TTL level bi-directional pin with 12 mA source-sink capability - CMOS level bi-directional pin with 12 mA source-sink capability - CMOS level bi-directional pin with 16 mA source-sink capability with internal pull-up resistor
I/OD16u - CMOS level bi-directional pin open drain output with 16 mA sink capability with internal pull-up resistor I/O24t - TTL level bi-directional pin with 24 mA source-sink capability OUT8t OUT12t OD12 OD24 INt INc INcu INcs INts INtsu - TTL level output pin with 8 mA source-sink capability - TTL level output pin with 12 mA source-sink capability - Open-drain output pin with 12 mA sink capability - Open-drain output pin with 24 mA sink capability - TTL level input pin - CMOS level input pin - CMOS level input pin with internal pull-up resitor - CMOS level Schmitt-triggered input pin - TTL level Schmitt-triggered input pin - TTL level Schmitt-triggered input pin with internal pull-up resistor
4.1
Host Interface
PIN I/O FUNCTION
SYMBOL
A0-A10 A11-A14 A15 D0-D5 D6-D7 IOR# IOW# AEN IOCHRDY MR DACK0# GP16 (WDTO) P15
74-84 86-89 91 109-114 116-117 105 106 107 108 118 119
INt INt INt I/O12t I/O12t INts INts INts OD24 INts INtsu I/O12t I/O12t
System address bus bits 0-10 System address bus bits 11-14 System address bus bit 15 System data bus bits 0-5 System data bus bits 6-7 CPU I/O read signal CPU I/O write signal System address bus enable In EPP Mode, this pin is the IO Channel Ready output to extend the host read/write cycle. Master Reset; Active high; MR is low during normal operations. DMA Channel 0 Acknowledge signal. (CR2C bit 5_4 = 00, default) General purpose I/O port 1bit 6. (CR2C bit 5_4 = 01) Alternate function from GP16: Watch dog timer output KBC P15 I/O port. (CR2C bit 5_4 = 10)
-9-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
Host Interface , continted.
SYMBOL
PIN
I/O
FUNCTION
DRQ0 GP17 (PLEDO) P14 SCI# DACK1# DRQ1 DACK2# DRQ2 DACK3# DRQ3 TC IRQ1 IRQ3 IRQ4 IRQ5 IRQ6 IRQ7 IRQ9 IRQ10 IRQ11 IRQ12 IRQ14 GP14 (GPACS1#) (P17) PLEDO IRQ15 GP15 (GPACS2#) (P12) WDT CLKIN
121
OUT12t I/O12t I/O12t OUT12t INts OUT12t INts OUT12t INts OUT12t INts OUT12t OUT12t OUT12t OUT12t OUT12t OUT12t OUT12t OUT12t OUT12t OUT12t OUT12t I/O12t
122 123 124 125 126 127 128 99 98 97 96 95 94 92 100 101 102 103
OUT12t 104 OUT12t I/O12t
DMA Channel 0 request signal. (CR2C bit 7_6 = 00, default) General purpose I/O port 1bit 7. (CR2C bit 7_6 = 01) Alternate Function from GP17: Power LED output. KBC P14 I/O port (CR2C bit 7_6 = 10) System Control Interrupt (CR2C bit 7_6 = 11) DMA Channel 1 Acknowledge signal DMA Channel 1 request signal DMA Channel 2 Acknowledge signal DMA Channel 2 request signal DMA Channel 3 Acknowledge signal DMA Channel 3 request signal Terminal Count. When active, this pin indicates termination of a DMA transfer. Interrupt request 1 Interrupt request 3 Interrupt request 4 Interrupt request 5 Interrupt request 6 Interrupt request 7 Interrupt request 9 Interrupt request 10 Interrupt request 11 Interrupt request 12 Interrupt request 14. (CR2C bit 1_0 = 00, default) General purpose I/O port 1 bit 4. (CR2C bit 1_0 = 01) Alternate Function 1 from GP14: General purpose address decode output. Alternate Function 2 from GP14: KBC P17 I/O port. Power LED output. (CR2C bit 1_0 = 10) Interrupt request 15.(CR2C bit 3_2 = 00, default) General purpose I/O port 1 bit 5. (CR2C bit 3_2 = 01) Alternate Function 1 from GP15: General purpose address write enable output. Alternate Function 2 from GP15: KBC P12 I/O port. Watch-Dog timer output. (CR2C bit 3_2 = 10) 24 or 48 MHz clock input, selectable through bit 5 of CR24.
OUT12t 1 INt
-10-
W83977EF-AW/W83977EG-AW
4.2 General Purpose I/O Port
PIN I/O FUNCTION
SYMBOL
PWR_CTL# GP20 (KBRST) SMI # GP21 (P13) P16
PANSWOT#
69
OD16u I/O16tu
Power supply control General purpose I/O port 2 bit 0. Alternate Function from GP20: Keyboard reset (KBC P20) For the power management, the SMI is active low by the power management events, that generate and SCI in ACPI mode. (CR2B bit 4_3 = 00, default) General purpose I/O port 2 bit 1. (CR2B bit 4_3 = 01) Alternate Function from GP21: KBC P13 I/O port. KBC P16 I/O port. (CR2B bit 4_3 = 10) Panel Switch output. (CR2B bit 5 = 0, default) General purpose I/O port 2 bit 2. (CR2B bit 5 = 1) Alternate Function from GP22: KBC P14 I/O port. Panel Switch input. (CR2B bit 7_6 = 00, default) General purpose I/O port 2 bit 3. (CR2B bit 7_6 = 01) Alternate Function from GP23: KBC P15 I/O port Suspend C input Alternate Function from GP25: GATE A20 (KBC P21) General purpose I/O port 2 bit 5.
70
OD12t I/O12t I/O12t
GP22 (P14) PANSWIN# GP23 (P15)
SUSC#
72
OD12t I/O12t INt I/O12t
73
(GA20) GP25
39
INts I/O12
4.3
Serial Port Interface
PIN I/O FUNCTION
SYMBOL
CTSA# CTSB#
41 48 42 49 43
Clear To Send is the modem control input. INt The function of these pins can be tested by reading Bit 4 of the handshake status register. Data Set Ready. An active low signal indicates the modem or data set is ready to establish a communication link and transfer data to the UART. UART A Request To Send. An active low signal informs the modem or data set that the controller is ready to send data. During power-on reset, this pin is pulled down internally and is defined as HEFRAS, which provides the power-on value for CR26 bit 6 (HEFRAS). A 4.7 k is recommended if intends to pull up. (select 370H as configuration I/O ports address)
DSRA# DSRB# RTSA#
INt I/O8t
HEFRAS
-11-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
Serial Port Interface, continued
RTSB# DTRA# PNPCSV#
50
I/O8t
UART B Request To Send. An active low signal informs the modem or data set that the controller is ready to send data. UART A Data Terminal Ready. An active low signal informs the modem or data set that the controller is ready to communicate.
44
I/O8t
During power-on reset, this pin is pulled down internally and is defined as PNPCSV#, which provides the power-on value for CR24 bit 0 (PNPCSV#). A 4.7 k is recommended if intends to pull up. (clear the default value of FDC, UARTs, and PRT) UART B Data Terminal Ready. An active low signal informs the modem or data set that controller is ready to communicate. Serial Input. Used to receive serial data through the communication link. UART A Serial Output. Used to transmit serial data out to the communication link. During power-on reset, this pin is pulled down internally and is defined as PENKBC, which provides the power-on value for CR24 bit 2 (ENKBC). A 4.7 k resistor is recommended if intends to pull up. (enable KBC)
DTRB# SINA SINB SOUTA
51 45, 52 46
I/O8t INt I/O8t
PENKBC
SOUTB PEN48 DCDA# DCDB# RIA# RIB#
53 47 54 65 66
I/O8t
UART B Serial Output. During power-on reset, this pin is pulled down internally and is defined as PEN48, which provides the power-on value for CR24 bit 6 (EN48). A 4.7 k resistor is recommended if intends to pull up. Data Carrier Detect. An active low signal indicates the modem or data set has detected a data carrier. Ring Indicator. An active low signal indicates that a ring signal is being received from the modem or data set.
INt INt
4.4
Infrared Interface
PIN I/O FUNCTION
SYMBOL
IRRX IRTX
37 38
INcs OUT12t
Infrared Receiver input. Infrared Transmitter Output.
-12-
W83977EF-AW/W83977EG-AW
4.5 Multi-Mode Parallel Port
PIN I/O FUNCTION
The following pins have alternate functions, which are controlled by CR28 and L3-CRF0.
SYMBOL
SLCT
18
INt
OD12 OD12 PE 19 INt
OD12 OD12 BUSY 21 INt
OD12 OD12
ACK#
22
INt
OD12 OD12
PRINTER MODE: SLCT An active high input on this pin indicates that the printer is selected. This pin is pulled high internally. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: WE2# This pin is for Extension FDD B; its function is the same as the WE# pin of FDC. EXTENSION 2FDD MODE: WE2# This pin is for Extension FDD A and B; it function is the same as the WE# pin of FDC. PRINTER MODE: PE An active high input on this pin indicates that the printer has detected the end of the paper. This pin is pulled high internally. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: WD2# This pin is for Extension FDD B; its function is the same as the WD# pin of FDC. EXTENSION 2FDD MODE: WD2# This pin is for Extension FDD A and B; its function is the same as the WD# pin of FDC. PRINTER MODE: BUSY An active high input indicates that the printer is not ready to receive data. This pin is pulled high internally. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: MOB2# This pin is for Extension FDD B; the function of this pin is the same as the MOB# pin of FDC. EXTENSION 2FDD MODE:MOB2# This pin is for Extension FDD A and B; the function of this pin is the same as the MOB# pin of FDC. PRINTER MODE: ACK# An active low input on this pin indicates that the printer has received data and is ready to accept more data. This pin is pulled high internally. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: DSB2# This pin is for the Extension FDD B; its functions is the same as the DSB# pin of FDC. EXTENSION 2FDD MODE: DSB2# This pin is for Extension FDD A and B; it functions is the same as the DSB# pin of FDC.
-13-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
Multi-Mode Parallel Port, continued
SYMBOL
PIN
I/O
FUNCTION
ERR#
34
INt
OD12 OD12
SLIN#
32
OD12
OD12
OD12
INIT#
33
OD12
OD12
OD12
AFD#
35
OD12
OD12
OD12
PRINTER MODE: ERR# An active low input on this pin indicates that the printer has encountered an error condition. This pin is pulled high internally. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: HEAD2# This pin is for Extension FDD B; its function is the same as the HEAD#pin of FDC. EXTENSION 2FDD MODE: HEAD2# This pin is for Extension FDD A and B; its function is the same as the HEAD# pin of FDC. PRINTER MODE: SLIN# Output line for detection of printer selection. This pin is pulled high internally. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE:STEP2# This pin is for Extension FDD B; its function is the same as the STEP# pin of FDC. EXTENSION 2FDD MODE: STEP2# This pin is for Extension FDD A and B; its function is the same as the STEP# pin of FDC. PRINTER MODE: INIT# Output line for the printer initialization. This pin is pulled high internally. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: DIR2# This pin is for Extension FDD B; its function is the same as the DIR# pin of FDC. EXTENSION 2FDD MODE: DIR2# This pin is for Extension FDD A and B; its function is the same as the DIR# pin of FDC. PRINTER MODE: AFD# An active low output from this pin causes the printer to auto feed a line after a line is printed. This pin is pulled high internally. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: DRVDEN0 This pin is for Extension FDD B; its function is the same as the DRVDEN0 pin of FDC. EXTENSION 2FDD MODE: DRVDEN0 This pin is for Extension FDD A and B; its function is the same as the DRVDEN0 pin of FDC.
-14-
W83977EF-AW/W83977EG-AW
Multi-Mode Parallel Port, continued
SYMBOL
PIN
I/O
FUNCTION
STB#
36
OD12
PD0
31
I/O24t
INt
INt
PD1
30
I/O24t INt
INt
PD2
29
I/O24t
INt
INt 28 I/O24t
PD3
INt
INt
PRINTER MODE: STB# An active low output is used to latch the parallel data into the printer. This pin is pulled high internally. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: This pin is a tri-state output. EXTENSION 2FDD MODE: This pin is a tri-state output. PRINTER MODE: PD0 Parallel port data bus bit 0. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: INDEX2# This pin is for Extension FDD B; the function of this pin is the same as the INDEX# pin of FDC. It is pulled high internally. EXTENSION 2FDD MODE: INDEX2# This pin is for Extension FDD A and B; the function of this pin is the same as the INDEX# pin of FDC. It is pulled high internally. PRINTER MODE: PD1 Parallel port data bus bit 1. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: TRAK02# This pin is for Extension FDD B; the function of this pin is the same as the TRAK0# pin of FDC. It is pulled high internally. EXTENSION. 2FDD MODE: TRAK02# This pin is for Extension FDD A and B; the function of this pin is the same as the TRAK0# pin of FDC. It is pulled high internally. PRINTER MODE: PD2 Parallel port data bus bit 2. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: WP2# This pin is for Extension FDD B; the function of this pin is the same as the WP# pin of FDC. It is pulled high internally. EXTENSION. 2FDD MODE: WP2# This pin is for Extension FDD A and B; the function of this pin is the same as the WP# pin of FDC. It is pulled high internally. PRINTER MODE: PD3 Parallel port data bus bit 3. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: RDATA2# This pin is for Extension FDD B; the function of this pin is the same as the RDATA# pin of FDC. It is pulled high internally. EXTENSION 2FDD MODE: RDATA2# This pin is for Extension FDD A and B; this function of this pin is the same as the RDATA# pin of FDC. It is pulled high internally.
-15-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
Multi-Mode Parallel Port, continued
SYMBOL
PIN
I/O
FUNCTION
PD4
27
I/O24t
INt
INt
PRINTER MODE: PD4 Parallel port data bus bit 4. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: DSKCHG2# This pin is for Extension FDD B; the function of this pin is the same as the DSKCHG# pin of FDC. It is pulled high internally. EXTENSION 2FDD MODE: DSKCHG2# This pin is for Extension FDD A and B; this function of this pin is the same as the DSKCHG# pin of FDC. It is pulled high internally. PRINTER MODE: PD5 Parallel port data bus bit 5. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: This pin is a tri-state output. EXTENSION 2FDD MODE: This pin is a tri-state output. PRINTER MODE: PD6 Parallel port data bus bit 6. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: This pin is a tri-state output. EXTENSION. 2FDD MODE: MOA2# This pin is for Extension FDD A; its function is the same as the MOA# pin of FDC. PRINTER MODE: PD7 Parallel port data bus bit 7. Refer to description of the parallel port for definition of this pin in ECP and EPP mode. EXTENSION FDD MODE: This pin is a tri-state output. EXTENSION 2FDD MODE: DSA2# This pin is for Extension FDD A; its function is the same as the DSA# pin of FDC.
PD5
26
I/O24t
PD6 24 I/O24t OD24
PD7
23
I/O24t
OD24
-16-
W83977EF-AW/W83977EG-AW
4.6 FDC Interface
PIN I/O FUNCTION
SYMBOL
DRVDEN0 DRVDEN1 GP10 (IRQIN1) P12 SCI# HEAD# WE# WD# STEP# DIR# MOB# DSA# DSB# MOA# DSKCHG#
2 3
OD24 OD24 IO24t IO24t OUT12t
5 9 10 11 12 13 14 15 16 4
OD24 OD24 OD24 OD24 OD24 OD24 OD24 OD24 OD24 INcs
RDATA#
6
INcs
WP#
7
INcs
TRAK0#
8
INcs
INDEX#
17
INcs
Drive Density Select bit 0. Drive Density Select bit 1. (CR2A bit 1_0 = 00, default) General purpose I/O port 1 bit 0. (CR2A bit 1_0 = 01) Alternate Function from GP10: Interrupt channel input. KBC P12 I/O port. (CR2A bit 1_0 = 10) System Control Interrupt (CR2A bit 1_0 = 11) Head select. This open drain output determines which disk drive head is active. Logic 1 = side 0 Logic 0 = side 1 Write enable. An open drain output. Write data. This logic low open drain writes pre-compensation serial data to the selected FDD. An open drain output. Step output pulses. This active low open drain output produces a pulse to move the head to another track. Direction of the head step motor. An open drain output. Logic 1 = outward motion Logic 0 = inward motion Motor B On. When set to 0, this pin enables disk drive 1. This is an open drain output. Drive Select A. When set to 0, this pin enables disk drive A. This is an open drain output. Drive Select B. When set to 0, this pin enables disk drive B. This is an open drain output. Motor A On. When set to 0, this pin enables disk drive 0. This is an open drain output. Diskette change. This signal is active low at power on and whenever the diskette is removed. This input pin is pulled up internally by a 1 K resistor. The resistor can be disabled by bit 7 of L0-CRF0 (FIPURDWN). The read data input signal from the FDD. This input pin is pulled up internally by a 1 K resistor. The resistor can be disabled by bit 7 of L0-CRF0 (FIPURDWN). Write protected. This active low Schmitt input from the disk drive indicates that the diskette is write-protected. This input pin is pulled up internally by a 1 K resistor. The resistor can be disabled by bit 7 of L0-CRF0 (FIPURDWN). Track 0. This Schmitt-triggered input from the disk drive is active low when the head is positioned over the outermost track. This input pin is pulled up internally by a 1 K resistor. The resistor can be disabled by bit 7 of L0-CRF0 (FIPURDWN). This Schmitt-triggered input from the disk drive is active low when the head is positioned over the beginning of a track marked by an index hole. This input pin is pulled up internally by a 1 K resistor. The resistor can be disabled by bit 7 of L0-CRF0 (FIPURDWN). Publication Release Date: Apr. 2006 Revision 1.2
-17-
W83977EF-AW/W83977EG-AW
4.7 KBC Interface
PIN I/O FUNCTION
SYMBOL
KDATA MDATA KCLK MCLK GA20 GP11 (IRQIN2) KBRST GP12 (WDTO) KBLOCK GP13
59 60 67 68 56
I/O16u I/O16u I/O16u I/O16u I/O12t I/O12t
Keyboard Data PS2 Mouse Data Keyboard Clock PS2 Mouse Clock KBC GATE A20 (P21) Output. (CR2A bit 6 = 0, default) General purpose I/O port 1 bit 1. (CR2A bit 6 = 1) Alternate Function from GP11: Interrupt channel input. W83C45 Keyboard Reset (P20) Output. (CR2A bit 7 = 0, default) General purpose I/O port 1 bit 2. (CR2A bit 7 = 1) Alternate Function 1 from GP12 : Watchdog timer output. W83C45 KINH (P17) Input. (CR2B bit 0 = 0, default) General purpose I/O port 1 bit 3. (CR2B bit 0 = 1)
57
I/O12t I/O12t
58
INts I/O16t
4.8
POWER PINS
PIN FUNCTION
SYMBOL
VCC VSB GND
20, 55, 85, 115 71 25, 62, 90, 120
+5V power supply for the digital circuitry +5V stand-by power supply for the digital circuitry Ground
4.9
ACPI Interface
PIN I/O FUNCTION
SYMBOL
VBAT XTAL1 XTAL2
64 63 61
NA INC O8t
battery voltage input 32.768Khz Clock Input 32.768Khz Clock Output
-18-
W83977EF-AW/W83977EG-AW
5. FDC FUNCTIONAL DESCRIPTION
5.1 W83977EF/EG FDC
The floppy disk controller of W83977EF/EG integrates all of the logic required for floppy disk control. The FDC implements a PC/AT or PS/2 solution. All programmable options default to compatible values. The FIFO provides better system performance in multi-master systems. The digital data separator supports up to 2 M bits/sec data rate. The FDC includes the following blocks: AT interface, Precompensation, Data Rate Selection, Digital Data Separator, FIFO, and FDC Core.
5.1.1
AT interface
The interface consists of the standard asynchronous signals:RD#, WR#, A0-A3, IRQ, DMA control, and a data bus. The address lines select between the configuration registers, the FIFO and control/status registers. This interface can be switched between PC/AT, Model 30, or PS/2 normal modes. The PS/2 register sets are a superset of the registers found in a PC/AT.
5.1.2
FIFO (Data)
The FIFO is 16 bytes in size and has programmable threshold values. All command parameter information and disk data transfers go through the FIFO. Data transfers are governed by the RQM and DIO bits in the Main Status Register. The FIFO defaults to disabled mode after any form of reset. This maintains PC/AT hardware compatibility. The default values can be changed through the CONFIGURE command. The advantage of the FIFO is that it allows the system a larger DMA latency without causing disk errors. The following tables give several examples of the delays with a FIFO. The data are based upon the following formula: THRESHOLD # x (1/DATA/RATE) *8 - 1.5 S = DELAY
FIFO THRESHOLD MAXIMUM DELAY TO SERVICING AT 500K BPS
1 Byte 2 Byte 8 Byte 15 Byte
FIFO THRESHOLD
Data Rate 1 x 16 S - 1.5 S = 14.5 S 2 x 16 S - 1.5 S = 30.5 S 8 x 16 S - 1.5 S = 6.5 S 15 x 16 S - 1.5 S = 238.5 S
MAXIMUM DELAY TO SERVICING AT 1M BPS
1 Byte 2 Byte 8 Byte 15 Byte
Data Rate 1 x 8 S - 1.5 S = 6.5 S 2 x 8 S - 1.5 S = 14.5 S 8 x 8 S - 1.5 S = 62.5 S 15 x 8 S - 1.5 S = 118.5 S
-19-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
At the start of a command the FIFO is always disabled and command parameters must be sent based upon the RQM and DIO bit settings in the main status register. When the FDC enters the command execution phase, it clears the FIFO of any data to ensure that invalid data are not transferred. An overrun and underrun will terminate the current command and the data transfer. Disk writes will complete the current sector by generating a 00 pattern and valid CRC. Reads require the host to remove the remaining data so that the result phase may be entered. DMA transfers are enabled with the SPECIFY command and are initiated by the FDC by activating the DRQ pin during a data transfer command. The FIFO is enabled directly by asserting DACK# and addresses need not be valid. Note that if the DMA controller is programmed to function in verify mode a pseudo read is performed by the FDC based only onDACK#. This mode is only available when the FDC has been configured into byte mode (FIFO disabled) and is programmed to do a read. With the FIFO enabled the above operation is performed by using the new VERIFY command. No DMA operation is needed.
5.1.3
Data Separator
The function of the data separator is to lock onto the incoming serial read data. When a lock is achieved the serial front end logic of the chip is provided with a clock which is synchronized to the read data. The synchronized clock, called the Data Window, is used to internally sample the serial data portion of the bit cell, and the alternate state samples the clock portion. Serial to parallel conversion logic separates the read data into clock and data bytes. The Digital Data Separator (DDS) has three parts: control logic, error adjustment, and speed tracking. The DDS circuit cycles once every 12 clock cycles ideally. Any data pulse input will be synchronized and then adjusted by immediate error adjustment. The control logic will generate RDD and RWD for every pulse input. During any cycle where no data pulse is present, the DDS cycles are based on speed. A digital integrator is used to keep track of the speed changes in the input data stream.
5.1.4
Write Precompensation
The write precompensation logic is used to minimize bit shifts in the RDDATA stream from the disk drive. Shifting of bits is a known phenomenon in magnetic media and is dependent on the disk media and the floppy drive. The FDC monitors the bit stream that is being sent to the drive. The data patterns that require precompensation are well known. Depending upon the pattern, the bit is shifted either early or late relative to the surrounding bits.
5.1.5
Perpendicular Recording Mode
The FDC is also capable of interfacing directly to perpendicular recording floppy drives. Perpendicular recording differs from the traditional longitudinal method in that the magnetic bits are oriented vertically. This scheme packs more data bits into the same area. FDCs with perpendicular recording drives can read standard 3.5" floppy disks and can read and write perpendicular media. Some manufacturers offer drives that can read and write standard and perpendicular media in a perpendicular media drive. A single command puts the FDC into perpendicular mode. All other commands operate as they normally do. The perpendicular mode requires a 1 Mbps data rate for the FDC. At this data rate the FIFO eases the host interface bottleneck due to the speed of data transfer to or from the disk.
-20-
W83977EF-AW/W83977EG-AW
5.1.6 FDC Core
The W83977EF/EG FDC is capable of performing twenty commands. Each command is initiated by a multi-byte transfer from the microprocessor. The result can also be a multi-byte transfer back to the microprocessor. Each command consists of three phases: command, execution, and result. Command The microprocessor issues all required information to the controller to perform a specific operation. Execution The controller performs the specified operation. Result After the operation is completed, status information and other housekeeping information is provided to the microprocessor.
5.1.7
C: D: DIR:
FDC Commands
Cylinder number 0 - 256 Data Pattern Step Direction DIR = 0, step out DIR = 1, step in
Command Symbol Descriptions:
DS0: DS1: DTL: EC: EOT: EFIFO: EIS: EOT: FIFOTHR: GAP: GPL: H: HDS: HLT: HUT: LOCK: MFM: MT: N:
Disk Drive Select 0 Disk Drive Select 1 Data Length Enable Count End of Track Enable FIFO Enable Implied Seek End of track FIFO Threshold Gap length selection Gap Length Head number Head number select Head Load Time Head Unload Time Lock EFIFO, FIFOTHR, PTRTRK bits prevent affected by software reset MFM or FM Mode Multitrack The number of data bytes written in a sector Publication Release Date: Apr. 2006 Revision 1.2
-21-
W83977EF-AW/W83977EG-AW
NCN: ND: OW: PCN: POLL: PRETRK: R: RCN: R/W: SC: SK: SRT: ST0: ST1: ST2: ST3: WG: New Cylinder Number Non-DMA Mode Overwritten Present Cylinder Number Polling Disable Precompensation Start Track Number Record Relative Cylinder Number Read/Write Sector/per cylinder Skip deleted data address mark Step Rate Time Status Register 0 Status Register 1 Status Register 2 Status Register 3 Write gate alters timing of WE
-22-
W83977EF-AW/W83977EG-AW
(1) Read Data
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W W W W W W W
MT MFM 0 0
SK 0
0 0
0 0
1
1
0
Command codes Sector ID information prior to command execution
HDS DS1 DS0
---------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------------------------- EOT ------------------------------------------ GPL ------------------------------------------ DTL -----------------------
Execution R R R R R R R -------------------- ST0 ------------------------------------------ ST1 ------------------------------------------ ST2 -------------------------------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------
Data transfer between the FDD and system Status information after command execution
Result
Sector ID information after command execution
-23-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
(2) Read Deleted Data
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W W W W W W W
MT MFM 0 0
SK 0
0 0
1 0
1
0
0
Command codes
HDS DS1 DS0 Sector ID information prior to command execution
---------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------------------------- EOT ------------------------------------------ GPL ------------------------------------------ DTL -----------------------
Execution R Result R R R R R R -------------------- ST0 ------------------------------------------ ST1 ------------------------------------------ ST2 -------------------------------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------
Data transfer between the FDD and system Status information after command execution
Sector ID information after command execution
-24-
W83977EF-AW/W83977EG-AW
(3) Read A Track
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W W W W W W W
0 0
MFM 0
0 0
0 0
0 0
0
1
0
Command codes
HDS DS1 DS0 Sector ID information prior to command execution
---------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------------------------- EOT ------------------------------------------ GPL ------------------------------------------ DTL -----------------------
Execution
Data transfer between the FDD and system; FDD reads contents of all cylinders from index hole to EOT R -------------------- ST0 ------------------------------------------ ST1 ------------------------------------------ ST2 -------------------------------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N -----------------------Sector ID information after command execution Status information after command execution R R R R R R
Result
-25-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
(4) Read ID
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command Execution
W W
0 0
MFM 0
0 0
0 0
1 0
0 1 0 HDS DS1 DS0
Command codes The first correct ID information on the cylinder is stored in Data Register
Result
R R R R R R R
-------------------- ST0 ------------------------------------------ ST1 ------------------------------------------ ST2 -------------------------------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------
Status information after command execution Disk status after the command has been completed
(5) Verify
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W W W W W W
MT MFM SK 1 0 1 1 0 EC 0 0 0 0 HDS DS1 DS0 ---------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------------------------- EOT ------------------------------------------ GPL ------------------------------------------ DTL/SC -------------------
Command codes Sector ID information prior to command execution
Execution Result R R R R R R R -------------------- ST0 ------------------------------------------ ST1 ------------------------------------------ ST2 -------------------------------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------
No data transfer takes place Status information after command execution
Sector ID information after command execution
-26-
W83977EF-AW/W83977EG-AW
(6) Version
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command Result (7) Write Data
PHASE
W R
0 1
0 0
0 0
1 1
0 0
0 0
0 0
0 0
Command code Enhanced controller
R/W
D7
D6
D5
D4
D3
D2
D1
D0
REMARKS
Command
W W W W W W W W W
MT MFM 0 0
0 0
0 0
0 0
1
0
1
Command codes Sector ID information prior to Command execution
HDS DS1 DS0
---------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------------------------- EOT ------------------------------------------ GPL ------------------------------------------ DTL -----------------------
Execution R Result R R R R R R -------------------- ST0 ------------------------------------------ ST1 ------------------------------------------ ST2 -------------------------------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------
Data transfer between the FDD and system Status information after Command execution
Sector ID information after Command execution
-27-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
(8) Write Deleted Data
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W W W W W W W
MT MFM 0 0
0 0
0 0
1 0
0
0
1
Command codes Sector ID information prior to command execution
HDS DS1 DS0
---------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------------------------- EOT ------------------------------------------ GPL ------------------------------------------ DTL -----------------------
Execution R Result R R R R R R -------------------- ST0 ------------------------------------------ ST1 ------------------------------------------ ST2 -------------------------------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------
Data transfer between the FDD and system Status information after command execution
Sector ID information after command execution
-28-
W83977EF-AW/W83977EG-AW
(9) Format A Track
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W W W W W W W W R R R R R R R
0 0
MFM 0
0 0
0 0
1 0
1
0
1
Command codes Bytes/Sector Sectors/Cylinder Gap 3 Filler Byte
HDS DS1 DS0
---------------------- N -------------------------------------------- SC ------------------------------------------- GPL ------------------------------------------ D --------------------------------------------- C --------------------------------------------- H --------------------------------------------- R --------------------------------------------- N ------------------------------------------- ST0 ------------------------------------------ ST1 ------------------------------------------ ST2 -------------------------------------- Undefined ---------------------------------- Undefined ---------------------------------- Undefined ---------------------------------- Undefined -------------------
Execution for Each Sector Repeat:
Input Sector Parameters
Result
Status information after command execution
(10) Recalibrate
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W
0 0
0 0
0 0
0 0
0 0
1 0
1
1
Command codes Head retracted to Track 0 Interrupt
DS1 DS0
Execution
-29-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
(11) Sense Interrupt Status
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command Result
W R R
0
0
0
0
1
0
0
0
Command code Status information at the end of each seek operation
---------------- ST0 ---------------------------------------- PCN -------------------------
(12) Specify
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W
0
0
0
0
0
0
1
1
Command codes
| ---------SRT ----------- | --------- HUT ---------- | |------------ HLT ----------------------------------| ND
(13) Seek
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W
0 0
0 0
0 0
0 0
1 0
1
1
1
Command codes
HDS DS1 DS0 Head positioned over proper cylinder on diskette
-------------------- NCN -----------------------
Execution
R
(14) Configure
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W W
0 0 0
0 0
0 0
1 0
0 0
0 0
1 0
1 0
Configure information
EIS EFIFO POLL | ------ FIFOTHR ----| Internal registers written
| --------------------PRETRK ----------------------- |
Execution
-30-
W83977EF-AW/W83977EG-AW
(15) Relative Seek
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W W
1 0
DIR 0
0 0
0 0
1 0
1
1
1
Command codes
HDS DS1 DS0
| -------------------- RCN ---------------------------- |
(16) Dumpreg
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W R R R R R R R R R R
0
0
0
0
1
1
1
0
Registers placed in FIFO
Result
----------------------- PCN-Drive 0------------------------------------------ PCN-Drive 1 ----------------------------------------- PCN-Drive 2------------------------------------------ PCN-Drive 3 --------------------------SRT ------------------ | --------- HUT ------------------ HLT -----------------------------------| ND ------------------------ SC/EOT ---------------------LOCK 0 D3 D2 D1 D0 GAP WG 0 EIS EFIFO POLL | ------ FIFOTHR ------------------------------PRETRK -------------------------
(17) Perpendicular Mode
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command
W W
0 OW
0 0
0 D3
1 D2
0 D1
0 1 0 D0 GAP WG
Command Code
(18) Lock
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command Result
W R
LOCK 0 0 0
0 0
1 LOCK
0 0
1 0
0 0
0 0
Command Code
(19) Sense Drive Status
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command Result
W W R
0 0
0 0
0 0
0 0
0 1 0 0 0 HDS DS1 DS0
Command Code Status information about disk drive
---------------- ST3 -------------------------
-31-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
(20) Invalid
PHASE R/W D7 D6 D5 D4 D3 D2 D1 D0 REMARKS
Command Result
W R
------------- Invalid Codes ------------------------------------ ST0 ----------------------
Invalid codes (no operationFDC goes to standby state) ST0 = 80H
5.2
Register Descriptions
ADDRESS OFFSET READ REGISTER WRITE
There are several status, data, and control registers in W83977EF. These registers are defined below:
base address + 0 base address + 1 base address + 2 base address + 3 base address + 4 base address + 5 base address + 7
SA REGISTER SB REGISTER TD REGISTER MS REGISTER DT (FIFO) REGISTER DI REGISTER DO REGISTER TD REGISTER DR REGISTER DT (FIFO) REGISTER CC REGISTER
5.2.1
Status Register A (SA Register) (Read base address + 0)
This register is used to monitor several disk interface pins in PS/2 and Model 30 modes. In PS/2 mode, the bit definitions for this register are as follows:
7 6 5 4 3 2 1 0
DIR WP# INDEX# HEAD TRAK0# STEP DRV2# INIT PENDING
INIT PENDING (Bit 7): This bit indicates the value of the floppy disk interrupt output. DRV2# (Bit 6): 0 A second drive has been installed 1 A second drive has not been installed STEP (Bit 5): This bit indicates the complement of STEP# output.
-32-
W83977EF-AW/W83977EG-AW
TRAK0#(Bit 4): This bit indicates the value of TRAK0# input. HEAD (Bit 3): This bit indicates the complement of HEAD# output. 0 side 0 1 side 1 INDEX#(Bit 2): This bit indicates the value of INDEX# output. WP#(Bit 1): 0 disk is write-protected 1 disk is not write-protected DIR (Bit 0) This bit indicates the direction of head movement. 0 outward direction 1 inward direction In PS/2 Model 30 mode, the bit definitions for this register are as follows:
7 6 5 4 3 2 1 0
DIR# WP INDEX HEAD# TRAK0 STEP F/F DRQ INIT PENDING
INIT PENDING (Bit 7): This bit indicates the value of the floppy disk interrupt output. DRQ (Bit 6): This bit indicates the value of DRQ output pin. STEP F/F (Bit 5): This bit indicates the complement of latched STEP# output. TRAK0 (Bit 4): This bit indicates the complement of TRAK0# input. HEAD# (Bit 3): This bit indicates the value of HEAD# output. 0 side 1 1 side 0 Publication Release Date: Apr. 2006 Revision 1.2
-33-
W83977EF-AW/W83977EG-AW
INDEX (Bit 2): This bit indicates the complement of INDEX# output. WP (Bit 1): 0 disk is not write-protected 1 disk is write-protected DIR#(Bit 0) This bit indicates the direction of head movement. 0 inward direction 1 outward direction
5.2.2
Status Register B (SB Register) (Read base address + 1)
This register is used to monitor several disk interface pins in PS/2 and Model 30 modes. In PS/2 mode, the bit definitions for this register are as follows:
7 1 6 1 MOT EN A MOT EN B WE RDATA Toggle WDATA Toggle Drive SEL0 5 4 3 2 1 0
Drive SEL0 (Bit 5): This bit indicates the status of DO REGISTER bit 0 (drive select bit 0). WDATA Toggle (Bit 4): This bit changes state at every rising edge of the WD# output pin. RDATA Toggle (Bit 3): This bit changes state at every rising edge of the RDATA# output pin. WE (Bit 2): This bit indicates the complement of the WE# output pin. MOT EN B (Bit 1) This bit indicates the complement of the MOB# output pin. MOT EN A (Bit 0) This bit indicates the complement of the MOA# output pin. In PS/2 Model 30 mode, the bit definitions for this register are as follows:
-34-
W83977EF-AW/W83977EG-AW
7 6 5 4 3 2 1 0
DSC# DSD# WE F/F RDATA F/F WD F/F DSA# DSB# DRV2#
DRV2# (Bit 7): 0 A second drive has been installed 1 A second drive has not been installed DSB# (Bit 6): This bit indicates the status of DSB# output pin. DSA# (Bit 5): This bit indicates the status of DSA# output pin. WD F/F(Bit 4): This bit indicates the complement of the latched WD# output pin at every rising edge of the WD# output pin. RDATA F/F(Bit 3): This bit indicates the complement of the latched RDATA# output pin . WE F/F (Bit 2): This bit indicates the complement of latched WE# output pin. DSD# (Bit 1): 0 Drive D has been selected 1 Drive D has not been selected DSC# (Bit 0): 0 Drive C has been selected 1 Drive C has not been selected
-35-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
5.2.3 Digital Output Register (DO Register) (Write base address + 2)
The Digital Output Register is a write-only register controlling drive motors, drive selection, DRQ/IRQ enable, and FDC resetting. All the bits in this register are cleared by the MR pin. The bit definitions are as follows:
7 6 5 4 3 2 1-0 Drive Select: 00 select drive A 01 select drive B 10 select drive C 11 select drive D Floppy Disk Controller Reset Active low resets FDC DMA and INT Enable Active high enable DRQ/IRQ Motor Enable A. Motor A on when active high Motor Enable B. Motor B on when active high Motor Enable C. Motor C on when active high Motor Enable D. Motor D on when active high
5.2.4
Tape Drive Register (TD Register) (Read base address + 3)
This register is used to assign a particular drive number to the tape drive support mode of the data separator. This register also holds the media ID, drive type, and floppy boot drive information of the floppy disk drive. In normal floppy mode, this register includes only bit 0 and 1. The bit definitions are as follows:
7 X 6 X 5 X 4 X 3 X 2 X Tape sel 0 Tape sel 1 1 0
If three mode FDD function is enabled (EN3MODE = 1 in CR9), the bit definitions are as follows:
7 6 5 4 3 2 1 0
Tape Sel 0 Tape Sel 1 Floppy boot drive 0 Floppy boot drive 1 Drive type ID0 Drive type ID1 Media ID0 Media ID1
Media ID1 Media ID0 (Bit 7, 6): These two bits are read only. These two bits reflect the value of CR8 bit 3, 2. Drive type ID1 Drive type ID0 (Bit 5, 4): These two bits reflect two of the bits of CR7. Which two bits are reflected depends on the last drive selected in the DO REGISTER.
-36-
W83977EF-AW/W83977EG-AW
Floppy Boot drive 1, 0 (Bit 3, 2): These two bits reflect the value of CR8 bit 1, 0. Tape Sel 1, Tape Sel 0 (Bit 1, 0): These two bits assign a logical drive number to the tape drive. Drive 0 is not available as a tape drive and is reserved as the floppy disk boot drive.
TAPE SEL 1 TAPE SEL 0 DRIVE SELECTED
0 0 1 1
0 1 0 1
None 1 2 3
5.2.5
Main Status Register (MS Register) (Read base address + 4)
The Main Status Register is used to control the flow of data between the microprocessor and the controller. The bit definitions for this register are as follows:
7 6 5 4 3 2 1 0
FDD 0 Busy, (D0B = 1), FDD number 0 is in the SEEK mode. FDD 1 Busy, (D1B = 1), FDD number 1 is in the SEEK mode. FDD 2 Busy, (D2B = 1), FDD number 2 is in the SEEK mode. FDD 3 Busy, (D3B = 1), FDD number 3 is in the SEEK mode. FDC Busy, (CB). A read or write command is in the process when CB = HIGH. Non-DMA mode, the FDC is in the non-DMA mode, this bit is set only during the execution phase in non-DMA mode. Transition to LOW state indicates execution phase has ended. DATA INPUT/OUTPUT, (DIO). If DIO= HIGH then transfer is from Data Register to the processor. If DIO = LOW then transfer is from processor to Data Register. Request for Master (RQM). A high on this bit indicates Data Register is ready to send or receive data to or from the proce
5.2.6
Data Rate Register (DR Register) (Write base address + 4)
The Data Rate Register is used to set the transfer rate and write precompensation. The data rate of the FDC is programmed by the CC REGISTER for PC-AT and PS/2 Model 30 and PS/2 mode, and not by the DR REGISTER. The real data rate is determined by the most recent write to either of the DR REGISTER or CC REGISTER.
7 6 5 0 DRATE0 DRATE1 PRECOMP0 PRECOMP1 PRECOMP2 POWER DOWN S/W RESET 4 3 2 1 0
-37-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
S/W RESET (Bit 7): This bit is the software reset bit. POWER-DOWN (Bit 6): 0 FDC in normal mode 1 FDC in power-down mode PRECOMP2 PRECOMP1 PRECOMP0 (Bit 4, 3, 2): These three bits select the value of write precompensation. The following tables show the precompensation values for the combination of these bits.
PRECOMP PRECOMPENSATION DELAY
210 000 001 010 011 100 101 110 111
DATA RATE
250K - 1 Mbps Default Delays 41.67 nS 83.34 nS 125.00 nS 166.67 nS 208.33 nS 250.00 nS 0.00 nS (disabled)
2 Mbps Tape drive Default Delays 20.8 nS 41.17 nS 62.5nS 83.3 nS 104.2 nS 125.00 nS 0.00 nS (disabled)
DEFAULT PRECOMPENSATION DELAYS
250 KB/S 300 KB/S 500 KB/S 1 MB/S 2 MB/S
125 nS 125 nS 125 nS 41.67nS 20.8 nS
-38-
W83977EF-AW/W83977EG-AW
DRATE1 DRATE0 (Bit 1, 0): These two bits select the data rate of the FDC and reduced write current control. 00 01 10 11 500 KB/S (MFM), 250 KB/S (FM), RWC#= 1 300 KB/S (MFM), 150 KB/S (FM), RWC#= 0 250 KB/S (MFM), 125 KB/S (FM), RWC#= 0 1 MB/S (MFM), Illegal (FM), RWC#= 1
The 2 MB/S data rate for Tape drive is only supported by setting 01 to DRATE1 and DRATE0 bits, as well as setting 10 to DRT1 and DRT0 bits which are two of the Configure Register CRF4 or CRF5 bits in logic device 0. Please refer to the function description of CRF4 or CRF5 and data rate table for individual data rates setting.
5.2.7
FIFO Register (R/W base address + 5)
The Data Register consists of four status registers in a stack with only one register presented to the data bus at a time. This register stores data, commands, and parameters and provides diskette-drive status information. Data bytes are passed through the data register to program or obtain results after a command. In the W83977EF/EG, this register defaults to FIFO disabled mode after reset. The FIFO can change its value and enable its operation through the CONFIGURE command. Status Register 0 (ST0)
7-6 5 4 3 2 1-0
US1, US0 Drive Select: 00 Drive A selected 01 Drive B selected 10 Drive C selected 11 Drive D selected HD Head address: 1 Head selected 0 Head selected NR Not Ready: 1 Drive is not ready 0 Drive is ready EC Equipment Check: 1 When a fault signal is received from the FDD or the track 0 signal fails to occur after 77 step pulses 0 No error SE Seek end: 1 seek end 0 seek error IC Interrupt Code: 00 Normal termination of command 01 Abnormal termination of command 10 Invalid command issue 11 Abnormal termination because the ready signal from FDD changed state during command executio
-39-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
Status Register 1 (ST1)
7 6 5 4 3 2 1 0
Missing Address Mark. 1 When the FDC cannot detect the data address mark or the data address mark has been deleted. NW (Not Writable). 1 If a write Protect signal is detected from the diskette drive during execution of write data. ND (No DATA). 1 If specified sector cannot be found during execution of a read, write or verifly data. Not used. This bit is always 0. OR (Over Rum). 1 If the FDC is not serviced by the host system within a certain time interval during data transfer. DE (data Error).1 When the FDC detects a CRC error in either the ID field or the data field. Not used. This bit is always 0. EN (End of track). 1 When the FDC tries to access a sector beyond the final sector of a cylinder.
Status Register 2 (ST2)
7 6 5 4 3 2 1 0
MD (Missing Address Mark in Data Field). 1 If the FDC cannot find a data address mark (or the address mark has been deleted) when reading data from the media 0 No error BC (Bad Cylinder) 1 Bad Cylinder 0 No error SN (Scan Not satisfied) 1 During execution of the Scan command 0 No error SH (Scan Equal Hit) 1 During execution of the Scan command, if the equal condition is satisfied 0 No error WC (Wrong Cylinder) 1 Indicates wrong Cylinder DD (Data error in the Data field) 1 If the FDC detects a CRC error in the data field 0 No error CM (Control Mark) 1 During execution of the read data or scan command 0 No error Not used. This bit is always 0
Status Register 3 (ST3)
7 6 5 4 3 2 1 0
US0 Unit Select 0 US1 Unit Select 1 HD Head Address TS Two-Side TO Track 0 RY Ready WP Write Protected FT Fault
-40-
W83977EF-AW/W83977EG-AW
5.2.8 Digital Input Register (DI Register) (Read base address + 7)
The Digital Input Register is an 8-bit read-only register used for diagnostic purposes. In a PC/XT or AT only Bit 7 is checked by the BIOS. When the register is read, Bit 7 shows the complement ofDSKCHG#, while other bits of the data bus remain in tri-state. Bit definitions are as follows:
7 6 5 4 3 2 1 0
xxxxxxx for hard disk controller x Reservedreadthe this register, these bits are in tri-stat During a of
DSKCHG
In the PS/2 mode, the bit definitions are as follows:
7 6 1 5 1 4 1 3 1 HIGH DENS# DRATE0 DRATE1 2 1 0
DSKCHG
DSKCHG (Bit 7): This bit indicates the complement of the DSKCHG# input. Bit 6-3: These bits are always a logic 1 during a read. DRATE1 DRATE0 (Bit 2, 1): These two bits select the data rate of the FDC. Refer to the DR register bits 1 and 0 for the settings corresponding to the individual data rates. HIGHDENS#(Bit 0): 0 1 500 KB/S or 1 MB/S data rate (high density FDD) 250 KB/S or 300 KB/S data rate
-41-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
In the PS/2 Model 30 mode, the bit definitions are as follows:
7 6 0 5 0 4 0 DRATE0 DRATE1 NOPREC DMAEN 3 2 1 0
DSKCHG#
DSKCHG (Bit 7): This bit indicates the status of DSKCHG# input. Bit 6-4: These bits are always a logic 1 during a read. DMAEN (Bit 3): This bit indicates the value of DO REGISTER bit 3. NOPREC (Bit 2): This bit indicates the value of CC REGISTER NOPREC bit. DRATE1 DRATE0 (Bit 1, 0): These two bits select the data rate of the FDC.
5.2.9
Configuration Control Register (CC Register) (Write base address + 7)
This register is used to control the data rate. In the PC/AT and PS/2 mode, the bit definitions are as follows:
7 6 5 4 3 2 1 0
x
x
x
x
x
x
DRATE0 DRATE1
X: Reserved Bit 7-2: Reserved. These bits should be set to 0. DRATE1 DRATE0 (Bit 1, 0): These two bits select the data rate of the FDC. In the PS/2 Model 30 mode, the bit definitions are as follows:
-42-
W83977EF-AW/W83977EG-AW
7 X 6 X 5 X 4 X 3 X DRATE0 DRATE1 NOPREC 2 1 0
X: Reserved Bit 7-3: Reserved. These bits should be set to 0. NOPREC (Bit 2): This bit indicates no precompensation. It has no function and can be set by software. DRATE1 DRATE0 (Bit 1, 0): These two bits select the data rate of the FDC.
-43-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
6. UART PORT
6.1 Universal Asynchronous Receiver/Transmitter (UART A, UART B)
The UARTs are used to convert parallel data into serial format on the transmit side and convert serial data to parallel format on the receiver side. The serial format, in order of transmission and reception, is a start bit, followed by five to eight data bits, a parity bit (if programmed) and one, one and half (fivebit format only) or two stop bits. The UARTs are capable of handling divisors of 1 to 65535 and producing a 16x clock for driving the internal transmitter logic. Provisions are also included to use this 16x clock to drive the receiver logic. The UARTs also support the MIDI data rate. Furthermore, the UARTs also include complete modem control capability and a processor interrupt system that may be software trailed to the computing time required to handle the communication link. The UARTs have a FIFO mode to reduce the number of interrupts presented to the CPU. In each UART, there are 16byte FIFOs for both receive and transmit mode.
6.2
6.2.1
Register Address
UART Control Register (UCR) (Read/Write)
The UART Control Register controls and defines the protocol for asynchronous data communications, including data length, stop bit, parity, and baud rate selection.
7 6 5 4 3 2 1 0
Data length select bit 0 (DLS0) Data length select bit 1(DLS1) Multiple stop bits enable (MSBE) Parity bit enable (PBE) Even parity enable (EPE) Parity bit fixed enable (PBFE) Set silence enable (SSE) Baudrate divisor latch access bit (BDLAB)
Bit 7: BDLAB. When this bit is set to a logical 1, designers can access the divisor (in 16-bit binary format) from the divisor latches of the baudrate generator during a read or write operation. When this bit is reset, the Receiver Buffer Register, the Transmitter Buffer Register, or the Interrupt Control Register can be accessed. Bit 6: SSE. A logical 1 forces the Serial Output (SOUT) to a silent state (a logical 0). Only IRTX is affected by this bit; the transmitter is not affected. Bit 5: PBFE. When PBE and PBFE of UCR are both set to a logical 1, (1) if EPE is logical 1, the parity bit is fixed as logical 0 to transmit and check. (2) if EPE is logical 0, the parity bit is fixed as logical 1 to transmit and check.
-44-
W83977EF-AW/W83977EG-AW
TABLE 6-1 UART Register Bit Map
BIT NUMBER
REGISTER ADDRESS BASE 0 1 2 3 4 5 6 7
+0 BDLAB = 0 +0 BDLAB = 0 +1 BDLAB = 0
Receiver Buffer Register (Read Only) Transmitter Buffer Register (Write Only) Interrupt Control Register Interrupt Status Register (Read Only) UART FIFO Control Register (Write Only) UART Control Register Handshake Control Register
RX Data RBR Bit 0
RX Data Bit 1
RX Data Bit 2
RX Data Bit 3
RX Data Bit 4
RX Data Bit 5
RX Data Bit 6
RX Data Bit 7
TBR
TX Data Bit 0
TX Data Bit 1
TX Data Bit 2 USR Interrupt Enable (EUSRI) Interrupt Status Bit (1) XMIT FIFO Reset Multiple Stop Bits Enable (MSBE) Loopback RI Input Parity Bit Error (PBER) RI Falling Edge (FERI) Bit 2 Bit 2
TX Data Bit 3 HSR Interrupt Enable (EHSRI) Interrupt Status Bit (2)** DMA Mode Select Parity Bit Enable (PBE) IRQ Enable No Stop Bit Error (NSER) DCD Toggling (TDCD) Bit 3 Bit 3
TX Data Bit 4
TX Data Bit 5
TX Data Bit 6
TX Data Bit 7
ICR
RBR Data TBR Ready Empty Interrupt Interrupt Enable Enable (ERDRI) (ETBREI) "0" if Interrupt Pending Interrupt Status Bit (0) RCVR FIFO Reset Data Length Select Bit 1 (DLS1) Request to Send (RTS) Overrun Error (OER) DSR Toggling (TDSR) Bit 1 Bit 1
0
0
0
0
FIFOs 0 0 Enabled ** RX Interrupt Active Level (LSB) Set Silence Enable (SSE)
FIFOs Enabled ** RX Interrupt Active Level (MSB) Baudrate Divisor Latch Access Bit (BDLAB) 0 RX FIFO Error Indication (RFEI) ** Data Carrier Detect (DCD) Bit 7 Bit 7
+2
ISR
+2
UFR
FIFO Enable Data Length Select Bit 0 (DLS0) Data Terminal Ready (DTR) RBR Data Ready (RDR) CTS Toggling (TCTS) Bit 0 Bit 0
Reserved Reversed
+3
UCR
Even Parity Enable (EPE) Internal Loopback Enable Silent Byte Detected (SBD) Clear to Send (CTS) Bit 4 Bit 4
Parity Bit Fixed Enable PBFE)
+4
HCR
0
0
+5
UART Status USR Register Handshake Status Register
TBR Empty (TBRE) Data Set Ready (DSR) Bit 5 Bit 5
TSR Empty (TSRE) Ring Indicator (RI) Bit 6 Bit 6
+6
HSR
+7
User Defined UDR Register BLL
+0 Baudrate BDLAB = Divisor Latch Low 1 +1 Baudrate BDLAB = Divisor Latch High 1
BHL
Bit 8
Bit 9
Bit 10
Bit 11
Bit 12
Bit 13
Bit 14
Bit 15
*: Bit 0 is the least significant bit. The least significant bit is the first bit serially transmitted or received. **: These bits are always 0 in 16450 Mode.
-45-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
Bit 4: EPE. This bit describes the number of logic 1's in the data word bits and parity bit only when bit 3 is programmed. When this bit is set, an even number of logic 1's are sent or checked. When the bit is reset, an odd number of logic 1's are sent or checked. Bit 3: PBE. When this bit is set, the position between the last data bit and the stop bit of the SOUT will be stuffed with the parity bit at the transmitter. For the receiver, the parity bit in the same position as the transmitter will be detected. Bit 2: MSBE. This bit defines the number of stop bits in each serial character that is transmitted or received. (1) If MSBE is set to a logical 0, one stop bit is sent and checked. (2) If MSBE is set to a logical 1, and data length is 5 bits, one and a half stop bits are sent and checked. (3) If MSBE is set to a logical 1, and data length is 6, 7, or 8 bits, two stop bits are sent and checked. Bits 0 and 1: DLS0, DLS1. These two bits define the number of data bits that are sent or checked in each serial character. TABLE 6-2 WORD LENGTH DEFINITION
DLS1 DLS0 DATA LENGTH
0 0 1 1
0 1 0 1
5 bits 6 bits 7 bits 8 bits
-46-
W83977EF-AW/W83977EG-AW
6.2.2 UART Status Register (USR) (Read/Write)
This 8-bit register provides information about the status of the data transfer during communication.
7 6 5 4 3 2 1 0
RBR Data ready (RDR) Overrun error (OER) Parity bit error (PBER) No stop bit error (NSER) Silent byte detected (SBD) Transmitter Buffer Register empty (TBRE) Transmitter Shift Register empty (TSRE) RX FIFO Error Indication (RFEI)
Bit 7: RFEI. In 16450 mode, this bit is always set to a logic 0. In 16550 mode, this bit is set to a logic 1 when there is at least one parity bit error, no stop bit error or silent byte detected in the FIFO. In 16550 mode, this bit is cleared by reading from the USR if there are no remaining errors left in the FIFO. Bit 6: TSRE. In 16450 mode, when TBR and TSR are both empty, this bit will be set to a logical 1. In 16550 mode, if the transmit FIFO and TSR are both empty, it will be set to a logical 1. Other thanthese two cases, this bit will be reset to a logical 0. Bit 5: TBRE. In 16450 mode, when a data character is transferred from TBR to TSR, this bit will be set to a logical 1. If ETREI of ICR is a logical 1, an interrupt will be generated to notify the CPU to write the next data. In 16550 mode, this bit will be set to a logical 1 when the transmit FIFO is empty. It will be reset to a logical 0 when the CPU writes data into TBR or FIFO. Bit 4: SBD. This bit is set to a logical 1 to indicate that received data are kept in silent state for a full word time, including start bit, data bits, parity bit, and stop bits. In 16550 mode, it indicates the same condition for the data on top of the FIFO. When the CPU reads USR, it will clear this bit to a logical 0. Bit 3: NSER. This bit is set to a logical 1 to indicate that the received data have no stop bit. In 16550 mode, it indicates the same condition for the data on top of the FIFO. When the CPU reads USR, it will clear this bit to a logical 0. Bit 2: PBER. This bit is set to a logical 1 to indicate that the parity bit of received data is wrong. In 16550 mode, it indicates the same condition for the data on top of the FIFO. When the CPU reads USR, it will clear this bit to a logical 0. Bit 1: OER. This bit is set to a logical 1 to indicate received data have been overwritten by the next received data before they were read by the CPU. In 16550 mode, it indicates the same condition instead of FIFO full. When the CPU reads USR, it will clear this bit to a logical 0. Bit 0: RDR. This bit is set to a logical 1 to indicate received data are ready to be read by the CPU in the RBR or FIFO. After no data are left in the RBR or FIFO, the bit will be reset to a logical 0.
-47-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
6.2.3 Handshake Control Register (HCR) (Read/Write) This register controls the pins of the UART used for handshaking peripherals such as modem, and controls the diagnostic mode of the UART.
7 0 6 0 5 0 Data terminal ready (DTR) Request to send (RTS) Loopback RI input IRQ enable Internal loopback enable 4 3 2 1 0
Bit 4: When this bit is set to a logical 1, the UART enters diagnostic mode by an internal loopback, as follows: (1) SOUT is forced to logical 1, and SIN is isolated from the communication link instead of the TSR. (2) Modem output pins are set to their inactive state. (3) Modem input pins are isolated from the communication link and connect internally as DTR (bit 0 of HCR) DSR#, RTS ( bit 1 of HCR) CTS#, Loopback RI input ( bit 2 of HCR) RI#and IRQ enable ( bit 3 of HCR) DCD#. Aside from the above connections, the UART operates normally. This method allows the CPU to test the UART in a convenient way. Bit 3: The UART interrupt output is enabled by setting this bit to a logic 1. In the diagnostic mode this bit is internally connected to the modem control input DCD#. Bit 2: This bit is used only in the diagnostic mode. In the diagnostic mode this bit is internally connected to the modem control input RI#. Bit 1: This bit controls the RTS# output. The value of this bit is inverted and output to RTS#. Bit 0: This bit controls the DTR# output. The value of this bit is inverted and output to DTR#.
6.2.4
Handshake Status Register (HSR) (Read/Write)
This register reflects the current state of four input pins for handshake peripherals such as a modem and records changes on these pins.
7 6 5 4 3 2 1 0
CTS# toggling (TCTS) DSR# toggling (TDSR) RI falling edge (FERI) DCD# toggling (TDCD) Clear to send (CTS) Data set ready (DSR) Ring indicator (RI) Data carrier detect (DCD)
Bit 7: This bit is the opposite of the DCD# input. This bit is equivalent to bit 3 of HCR in loopback mode.
-48-
W83977EF-AW/W83977EG-AW
Bit 6: This bit is the opposite of the RI # input. This bit is equivalent to bit 2 of HCR in loopback mode. Bit 5: This bit is the opposite of the DSR# input. This bit is equivalent to bit 0 of HCR in loopback mode. Bit 4: This bit is the opposite of the CTS# input. This bit is equivalent to bit 1 of HCR in loopback mode. Bit 3: TDCD. This bit indicates that the DCD# pin has changed state after HSR was read by the CPU. Bit 2: FERI. This bit indicates that the RI # pin has changed from low to high state after HSR was read by the CPU. Bit 1: TDSR. This bit indicates that the DSR# pin has changed state after HSR was read by the CPU. Bit 0: TCTS. This bit indicates that the CTS# pin has changed state after HSR was read.
6.2.5
UART FIFO Control Register (UFR) (Write only)
2 1
This register is used to control the FIFO functions of the UART.
7 6 5 4 3 0
FIFO enable Receiver FIFO reset Transmitter FIFO reset DMA mode select Reserved Reserved RX interrupt active level (LSB) RX interrupt active level (MSB)
Bit 6, 7: These two bits are used to set the active level for the receiver FIFO interrupt. For example, if the interrupt active level is set as 4 bytes, once there are more than 4 data characters in the receiver FIFO, the interrupt will be activated to notify the CPU to read the data from the FIFO. TABLE 6-3 FIFO TRIGGER LEVEL
BIT 7 BIT 6 RX FIFO INTERRUPT ACTIVE LEVEL (BYTES)
0 0 1 1
0 1 0 1
01 04 08 14
Bit 4, 5: Reserved Bit 3: When this bit is programmed to logic 1, the DMA mode will change from mode 0 to mode 1 if UFR bit 0 = 1. Bit 2: Setting this bit to a logical 1 resets the TX FIFO counter logic to initial state. This bit will clear to a logical 0 by itself after being set to a logical 1. Bit 1: Setting this bit to a logical 1 resets the RX FIFO counter logic to initial state. This bit will clear to a logical 0 by itself after being set to a logical 1. Publication Release Date: Apr. 2006 Revision 1.2
-49-
W83977EF-AW/W83977EG-AW
Bit 0: This bit enables the 16550 (FIFO) mode of the UART. This bit should be set to a logical 1 before other bits of UFR are programmed.
6.2.6
Interrupt Status Register (ISR) (Read only)
This register reflects the UART interrupt status, which is encoded by different interrupt sources into 3 bits.
7 6 5 0 4 0 0 if interrupt pending Interrupt Status bit 0 Interrupt Status bit 1 Interrupt Status bit 2 FIFOs enabled FIFOs enabled 3 2 1 0
Bit 7, 6: These two bits are set to a logical 1 when UFR bit 0 = 1. Bit 5, 4: These two bits are always logic 0. Bit 3: In 16450 mode, this bit is 0. In 16550 mode, both bit 3 and 2 are set to a logical 1 when a timeout interrupt is pending. Bit 2, 1: These two bits identify the priority level of the pending interrupt, as shown in the table below. Bit 0: This bit is a logical 1 if there is no interrupt pending. If one of the interrupt sources has occurred, this bit will be set to a logical 0. TABLE 6-4 INTERRUPT CONTROL FUNCTION
ISR
Bit 3 0 0 Bit 2 0 1 Bit 1 0 1 Bit 0 1 0 Interrupt priority First Interrupt Type UART Receive Status RBR Data Ready
INTERRUPT SET AND FUNCTION
Interrupt Source No Interrupt pending 1. OER = 1 2. PBER =1 3. NSER = 1 4. SBD = 1 1. RBR data ready 2. FIFO interrupt active level reached Data present in RX FIFO for 4 characters period of time since last access of RX FIFO. TBR empty 1. TCTS = 1 3. FERI = 1 2. TDSR = 1 4. TDCD = 1 Read USR 1. Read RBR 2. Read RBR until FIFO data under active level Read RBR 1. Write data into TBR Clear Interrupt -
0
1
0
0
Second
1
1
0
0
Second
FIFO Data Timeout
0
0
1
0
Third
TBR Empty
2. Read ISR (if priority is third) Read HSR
0
0
0
0
Fourth
Handshake status
** Bit 3 of ISR is enabled when bit 0 of UFR is logical 1.
-50-
W83977EF-AW/W83977EG-AW
6.2.7 Interrupt Control Register (ICR) (Read/Write)
This 8-bit register allows the five types of controller interrupts to activate the interrupt output signal separately. The interrupt system can be totally disabled by resetting bits 0 through 3 of the Interrupt Control Register (ICR). A selected interrupt can be enabled by setting the appropriate bits of this register to a logical 1.
7 0 6 0 5 0 4 0 RBR data ready interrupt enable (ERDRI) TBR empty interrupt enable (ETBREI) UART receive status interrupt enable (EUSRI) Handshake status interrupt enable (EHSRI) 3 2 1 0
Bit 7-4: These four bits are always logic 0. Bit 3: EHSRI. Setting this bit to a logical 1 enables the handshake status register interrupt. Bit 2: EUSRI. Setting this bit to a logical 1 enables the UART status register interrupt. Bit 1: ETBREI. Setting this bit to a logical 1 enables the TBR empty interrupt. Bit 0: ERDRI. Setting this bit to a logical 1 enables the RBR data ready interrupt.
6.2.8
Programmable Baud Generator (BLL/BHL) (Read/Write)
Two 8-bit registers, BLL and BHL, compose a programmable baud generator that uses 24 MHz to 16 generate a 1.8461 MHz frequency and divides it by a divisor from 1 to 2 -1. The output frequency of the baud generator is the baud rate multiplied by 16, and this is the base frequency for the transmitter and receiver. The table in the next page illustrates the use of the baud generator with a frequency of 1.8461 MHz. In high-speed UART mode (refer to CR0C bit7 and CR0C bit6), the programmable baud generator directly uses 24 MHz and the same divisor as the normal speed divisor. In high-speed mode, the data transmission rate can be as high as 1.5M bps.
-51-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
6.2.9 User-defined Register (UDR) (Read/Write)
TABLE 6-5 BAUD RATE TABLE
BAUD RATE FROM DIFFERENT PRE-DIVIDER
This is a temporary register that can be accessed and defined by the user.
Pre-Div: 13 1.8461M Hz 50 75 110 134.5 150 300 600 1200 1800 2000 2400 3600 4800 7200 9600 19200 38400 57600 115200
Pre-Div:1.625 14.769M Hz 400 600 880 1076 1200 2400 4800 9600 14400 16000 19200 28800 38400 57600 76800 153600 307200 460800 921600
Pre-Div: 1.0 24M Hz 650 975 1430 1478.5 1950 3900 7800 15600 23400 26000 31200 46800 62400 93600 124800 249600 499200 748800 1497600
Decimal divisor used to generate 16X clock 2304 1536 1047 857 768 384 192 96 64 58 48 32 24 16 12 6 3 2 1
Error Percentage between desired and actual ** ** 0.18% 0.099% ** ** ** ** ** 0.53% ** ** ** ** ** ** ** ** **
** The percentage error for all baud rates, except where indicated otherwise, is 0.16%.
Note. Pre-Divisor is determined by CRF0 of UART A and B.
-52-
W83977EF-AW/W83977EG-AW
7. PARALLEL PORT
7.1 Printer Interface Logic
The parallel port of W83977EF/EG makes possible the attachment of various devices that accept eight bits of parallel data at standard TTL level. W83977EF/EG supports an IBM XT/AT compatible parallel port (SPP), bi-directional parallel port (BPP), Enhanced Parallel Port (EPP), Extended Capabilities Parallel Port (ECP), Extension FDD mode (EXTFDD), Extension 2FDD mode (EXT2FDD) on the parallel port. Refer to the configuration registers for more information on disabling, powerdown, and on selecting the mode of operation. Table 7-1 shows the pin definitions for different modes of the parallel port. TABLE 7-1-1 PARALLEL PORT CONNECTOR AND PIN DEFINITIONS
HOST CONNECTOR PIN NUMBER OF W83977EF PIN ATTRIBUTE SPP EPP ECP
1 2-9 10 11 12 13 14 15 16
17 Notes:
36 31-26, 24-23 22 21 19 18 35 34 33
32
O I/O I I I I O I O
O
nSTB PD<0:7> nACK BUSY PE SLCT nAFD nERR nINIT
nSLIN
nWrite PD<0:7> Intr nWait PE Select nDStrb nError nInit
nAStrb
nSTB, HostClk2 PD<0:7> nACK, PeriphClk2 BUSY, PeriphAck2 PEerror, nAckReverse2 SLCT, Xflag2 nAFD, HostAck2 nFault1, nPeriphRequest2 nINIT1, nReverseRqst2
nSLIN1 , ECPMode2
n : Active Low 1. Compatible Mode 2. High Speed Mode 3. For more information, refer to the IEEE 1284 standard.
-53-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
TABLE 5-1-2 PARALLEL PORT CONNECTOR AND PIN DEFINITIONS HOST CONNECTOR PIN NUMBER OF W83977EF PIN ATTRIBUTE SPP PIN ATTRIBUT E EXT2FDD PIN ATTRIBUT E EXTFDD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
36 31 30 29 28 27 26 24 23 22 21 19 18 35 34 33 32
O I/O I/O I/O I/O I/O I/O I/O I/O I I I I O I O O
nSTB PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 nACK BUSY PE SLCT nAFD nERR nINIT nSLIN
--I I I I I --OD OD OD OD OD OD OD OD OD OD
--INDEX2# TRAK02# WP2# RDATA2# DSKCHG2# --MOA2# DSA2# DSB2# MOB2# WD2# WE2# RWC2# HEAD2# DIR2# STEP2#
--I I I I I ------OD OD OD OD OD OD OD OD
--INDEX2# TRAK02# WP2# RDATA2# DSKCHG2# ------DSB2# MOB2# WD2# WE2# RWC2# HEAD2# DIR2# STEP2#
7.2
Enhanced Parallel Port (EPP)
TABLE 7-2 PRINTER MODE AND EPP REGISTER ADDRESS
A2 A1 A0 REGISTER NOTE
0 0 0 0 0 1 1 1 1
0 0 1 1 1 0 0 1 1
0 1 0 0 1 0 1 0 1
Data port (R/W) Printer status buffer (Read) Printer control latch (Write) Printer control swapper (Read) EPP address port (R/W) EPP data port 0 (R/W) EPP data port 1 (R/W) EPP data port 2 (R/W) EPP data port 2 (R/W)
1 1 1 1 2 2 2 2 2
Notes: 1. These registers are available in all modes. 2. These registers are available only in EPP mode.
-54-
W83977EF-AW/W83977EG-AW
7.2.1 Data Swapper
The system microprocessor can read the contents of the printer's data latch by reading the data swapper.
7.2.2
Printer Status Buffer
The system microprocessor can read the printer status by reading the address of the printer status buffer. The bit definitions are as follows:
7 6 5 4 3 2 1 1 1 TMOUT ERROR# SLCT PE ACK# BUSY# 0
Bit 7: This signal is active during data entry, when the printer is off-line during printing, when the print head is changing position, or during an error state. When this signal is active, the printer is busy and cannot accept data. Bit 6: This bit represents the current state of the printer's ACK# signal. A 0 means the printer has received a character and is ready to accept another. Normally, this signal will be active for approximately 5 microseconds before BUSY# stops. Bit 5: Logical 1 means the printer has detected the end of paper. Bit 4: Logical 1 means the printer is selected. Bit 3: Logical 0 means the printer has encountered an error condition. Bit 1, 2: These two bits are not implemented and are logic one during a read of the status register. Bit 0: This bit is valid in EPP mode only. It indicates that a 10 S time-out has occurred on the EPP bus. A logic 0 means that no time-out error has occurred; a logic 1 means that a time-out error has been detected. Writing a logic 1 to this bit will clear the time-out status bit; writing a logic 0 has no effect.
-55-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
7.2.3 Printer Control Latch and Printer Control Swapper
The system microprocessor can read the contents of the printer control latch by reading the printer control swapper. Bit definitions are as follows:
7 1 6 1 STROBE AUTO FD INIT# SLCT IN IRQ ENABLE DIR 5 4 3 2 1 0
Bit 7, 6: These two bits are a logic one during a read. They can be written. Bit 5: Direction control bit When this bit is a logic 1, the parallel port is in input mode (read); when it is a logic 0, the parallel port is in output mode (write). This bit can be read and written. In SPP mode, this bit is invalid and fixed at zero. Bit 4: A 1 in this position allows an interrupt to occur when ACK# changes from low to high. Bit 3: A 1 in this bit position selects the printer. Bit 2: A 0 starts the printer (50 microsecond pulse, minimum). Bit 1: A 1 causes the printer to line-feed after a line is printed. Bit 0: A 0.5 microsecond minimum high active pulse clocks data into the printer. Valid data must be present for a minimum of 0.5 microseconds before and after the strobe pulse.
7.2.4
EPP Address Port
7 6 5 4 3 2 1 0
The address port is available only in EPP mode. Bit definitions are as follows:
PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7
The contents of DB0-DB7 are buffered (non-inverting) and output to ports PD0-PD7 during a write operation. The leading edge of IOW# causes an EPP address write cycle to be performed, and the trailing edge of IOW# latches the data for the duration of the EPP write cycle. PD0-PD7 ports are read during a read operation. The leading edge of IOR# causes an EPP address read cycle to be performed and the data to be output to the host CPU.
-56-
W83977EF-AW/W83977EG-AW
7.2.5 EPP Data Port 0-3
7 6 5 4 3 2 1 0
These four registers are available only in EPP mode. Bit definitions of each data port are as follows:
PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7
When accesses are made to any EPP data port, the contents of DB0-DB7 are buffered (non-inverting) and output to the ports PD0-PD7 during a write operation. The leading edge of IOW# causes an EPP data write cycle to be performed, and the trailing edge of IOW# latches the data for the duration of the EPP write cycle. During a read operation, ports PD0-PD7 are read, and the leading edge of IOR# causes an EPP read cycle to be performed and the data to be output to the host CPU.
7.2.6
Bit Map of Parallel Port and EPP Registers
REGISTER
7 PD7 BUSY# 1 1 PD7 PD7 PD7 PD7 PD7
6 PD6 ACK# 1 1 PD6 PD6 PD6 PD6 PD6
5 PD5 PE 1 DIR PD5 PD5 PD5 PD5 PD5
4 PD4 SLCT IRQEN IRQ PD4 PD4 PD4 PD4 PD4
3 PD3 ERROR# SLIN SLIN PD3 PD3 PD3 PD3 PD3
2 PD2 1 INIT# INIT# PD2 PD2 PD2 PD2 PD2
1 PD1 1 AUTOFD# AUTOFD# PD1 PD1 PD1 PD1 PD1
0 PD0 TMOUT STROBE# STROBE# PD0 PD0 PD0 PD0 PD0
Data Port (R/W) Status Buffer (Read) Control Swapper (Read) Control Latch (Write) EPP Address Port R/W) EPP Data Port 0 (R/W) EPP Data Port 1 (R/W) EPP Data Port 2 (R/W) EPP Data Port 3 (R/W)
-57-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
7.2.7
nWrite PD<0:7> Intr nWait PE Select nDStrb nError nInits nAStrb
EPP Pin Descriptions
TYPE EPP DESCRIPTION
EPP NAME
O I/O I I I I O I O O
Denotes an address or data read or write operation. Bi-directional EPP address and data bus. Used by peripheral device to interrupt the host. Inactive to acknowledge that data transfer is completed. Active to indicate that the device is ready for the next transfer. Paper end; same as SPP mode. Printer selected status; same as SPP mode. This signal is active low. It denotes a data read or write operation. Error; same as SPP mode. This signal is active low. When it is active, the EPP device is reset to its initial operating mode. This signal is active low. It denotes an address read or write operation.
7.2.8 EPP Operation When the EPP mode is selected in the configuration register, the standard and bi-directional modes are also available. The PDx bus is in the standard or bi-directional mode when no EPP read, write, or address cycle is currently being executed. In this condition all output signals are set by the SPP Control Port and the direction is controlled by DIR of the Control Port. A watchdog timer is required to prevent system lockup. The timer indicates that more than 10 S have elapsed from the start of the EPP cycle to the time WAIT# is deasserted. The current EPP cycle is aborted when a time-out occurs. The time-out condition is indicated in Status bit 0.
7.2.8.1. EPP Operation The EPP operates on a two-phase cycle. First, the host selects the register within the device for subsequent operations. Second, the host performs a series of read and/or write byte operations to the selected register. Four operations are supported on the EPP: Address Write, Data Write, Address Read, and Data Read. All operations on the EPP device are performed asynchronously. 7.2.8.2. EPP Version 1.9 Operation The EPP read/write operation can be completed under the following conditions: a. If the nWait is active low, when the read cycle (nWrite inactive high, nDStrb/nAStrb active low) or write cycle (nWrite active low, nDStrb/nAStrb active low) starts, the read/write cycle proceeds normally and will be completed when nWait goes inactive high. b. If nWait is inactive high, the read/write cycle will not start. It must wait until nWait changes to active low, at which time it will start as described above. 7.2.8.3. EPP Version 1.7 Operation The EPP read/write cycle can start without checking whether nWait is active or inactive. Once the read/write cycle starts, however, it will not terminate until nWait changes from active low to inactive high.
-58-
W83977EF-AW/W83977EG-AW
7.3 Extended Capabilities Parallel (ECP) Port
This port is software and hardware compatible with existing parallel ports, so it may be used as a standard printer mode if ECP is not required. It provides an automatic high burst-bandwidth channel that supports DMA for ECP in both the forward (host to peripheral) and reverse (peripheral to host) directions.
Small FIFOs are used in both forward and reverse directions to improve the maximum bandwidth requirement. The size of the FIFO is 16 bytes. The ECP port supports an automatic handshake for the standard parallel port to improve compatibility mode transfer speed. The ECP port supports run-length-encoded (RLE) decompression (required) in hardware. Compression is accomplished by counting identical bytes and transmitting an RLE byte that indicates how many times the next byte is to be repeated. Hardware support for compression is optional. For more information about the ECP Protocol, refer to the Extended Capabilities Port Protocol and ISA Interface Standard.
7.3.1
data
ECP Register and Mode Definitions
NAME ADDRESS I/O ECP MODES FUNCTION
Base+000h Base+000h Base+001h Base+002h Base+400h Base+400h Base+400h Base+400h Base+401h Base+402h
R/W R/W R R/W R/W R/W R/W R R/W R/W
000-001 011 All All 010 011 110 111 111 All
Data Register ECP FIFO (Address) Status Register Control Register Parallel Port Data FIFO ECP FIFO (DATA) Test FIFO Configuration Register A Configuration Register B Extended Control Register
ecpAFifo dsr dcr cFifo ecpDFifo tFifo cnfgA cnfgB ecr
Note: The base addresses are specified by CR60 and 61, which are determined by configuration register or hardware setting.
MODE
DESCRIPTION
000 001 010 011 100 101 110 111
SPP mode PS/2 Parallel Port mode Parallel Port Data FIFO mode ECP Parallel Port mode EPP mode (If this option is enabled in the CRF0 to select ECP/EPP mode) Reserved Test mode Configuration mode
Note: The mode selection bits are bit 7-5 of the Extended Control Register.
-59-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
7.3.2 Data and ecpAFifo Port
Modes 000 (SPP) and 001 (PS/2) (Data Port) During a write operation, the Data Register latches the contents of the data bus on the rising edge of the input. The contents of this register are output to the PD0-PD7 ports. During a read operation, ports PD0-PD7 are read and output to the host. The bit definitions are as follows:
7 6 5 4 3 2 1 0
PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7
Mode 011 (ECP FIFO-Address/RLE) A data byte written to this address is placed in the FIFO and tagged as an ECP Address/RLE. The hardware at the ECP port transmits this byte to the peripheral automatically. The operation of this register is defined only for the forward direction. The bit definitions are as follows:
7 6 5 4 3 2 1 0
Address or RLE
Address/RLE
7.3.3
Device Status Register (DSR)
These bits are at low level during a read of the Printer Status Register. The bits of this status register are defined as follows:
7 6 5 4 3 2 1 1 1 0 1
nFault Select PError nAck nBusy
-60-
W83977EF-AW/W83977EG-AW
Bit 7: This bit reflects the complement of the Busy input. Bit 6: This bit reflects the nAck input. Bit 5: This bit reflects the PError input. Bit 4: This bit reflects the Select input. Bit 3: This bit reflects the nFault input. Bit 2-0: These three bits are not implemented and are always logic one during a read.
7.3.4
Device Control Register (DCR)
The bit definitions are as follows:
7 1 6 1 strobe autofd nInit SelectIn ackIntEn Direction 5 4 3 2 1 0
Bit 6, 7: These two bits are logic one during a read and cannot be written. Bit 5: This bit has no effect and the direction is always out if mode = 000 or mode = 010. Direction is valid in all other modes. 0 the parallel port is in output mode. 1 the parallel port is in input mode. Bit 4: Interrupt request enable. When this bit is set to a high level, it may be used to enable interrupt requests from the parallel port to the CPU due to a low to high transition on the ACK# input. Bit 3: This bit is inverted and output to the SLIN# output. 0 The printer is not selected. 1 The printer is selected. Bit 2: This bit is output to the INIT# output. Bit 1: This bit is inverted and output to the AFD# output. Bit 0: This bit is inverted and output to the STB# output.
-61-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
7.3.5 CFIFO (Parallel Port Data FIFO) Mode = 010
This mode is defined only for the forward direction. The standard parallel port protocol is used by a hardware handshake to the peripheral to transmit bytes written or DMAed from the system to this FIFO. Transfers to the FIFO are byte aligned.
7.3.6
ECPDFIFO (ECP Data FIFO) Mode = 011
When the direction bit is 0, bytes written or DMAed from the system to this FIFO are transmitted by a hardware handshake to the peripheral using the ECP parallel port protocol. Transfers to the FIFO are byte aligned. When the direction bit is 1, data bytes from the peripheral are read under automatic hardware handshake from ECP into this FIFO. Reads or DMAs from the FIFO will return bytes of ECP data to the system.
7.3.7
TFIFO (Test FIFO Mode) Mode = 110
Data bytes may be read, written, or DMAed to or from the system to this FIFO in any direction. Data in the tFIFO will not be transmitted to the parallel port lines. However, data in the tFIFO may be displayed on the parallel port data lines.
7.3.8
CNFGA (Configuration Register A) Mode = 111
This register is a read-only register. When it is read, 10H is returned. This indicates to the system that this is an 8-bit implementation.
7.3.9
CNFGB (Configuration Register B) Mode = 111
The bit definitions are as follows:
7
6
5
4
3
2 1
1 1
0 1
IRQx 0 IRQx 1 IRQx 2 intrValue compress Bit 7: This bit is read-only. It is at low level during a read. This means that this chip does not support hardware RLE compression. Bit 6: Returns the value on the ISA IRQ line to determine possible conflicts.
-62-
W83977EF-AW/W83977EG-AW
Bit 5-3: Reflect the IRQ resource assigned for ECP port. cnfgB[5:3] 000 001 010 011 100 101 110 111 IRQ resource reflect other IRQ resources selected by PnP register (default) IRQ7 IRQ9 IRQ10 IRQ11 IRQ14 IRQ15 IRQ5
Bit 2-0: These five bits are at high level during a read and can be written.
7.3.10
ECR (Extended Control Register) Mode = all
7 6 5 4 3 2 1 0
This register controls the extended ECP parallel port functions. The bit definitions are follows:
empty full service Intr dmaEn nErrIntrEn MODE MODE MODE
Bit 7-5: These bits are read/write and select the mode. 000 Standard Parallel Port mode. The FIFO is reset in this mode. 001 PS/2 Parallel Port mode. This is the same as 000 except that direction may be used to tri-state the data lines and reading the data register returns the value on the data lines and not the value in the data register. 010 Parallel Port FIFO mode. This is the same as 000 except that bytes are written or DMAed to the FIFO. FIFO data are automatically transmitted using the standard parallel port protocol. This mode is useful only when direction is 0. 011 ECP Parallel Port Mode. When the direction is 0 (forward direction), bytes placed into the ecpDFifo and bytes written to the ecpAFifo are placed in a single FIFO and auto transmitted to the peripheral using ECP Protocol. When the direction is 1 (reverse direction), bytes are moved from the ECP parallel port and packed into bytes in the ecpDFifo. 100 Selects EPP Mode. In this mode, EPP is activated if the EPP mode is selected. 101 Reserved. 110 Test Mode. The FIFO may be written and read in this mode, but the data will not be transmitted on the parallel port. 111 Configuration Mode. The confgA and confgB registers are accessible at 0x400 and 0x401 in this mode.
Publication Release Date: Apr. 2006 Revision 1.2
-63-
W83977EF-AW/W83977EG-AW
Bit 4: Read/Write (Valid only in ECP Mode) 1 Disables the interrupt generated on the asserting edge of nFault. 0 Enables an interrupt pulse on the high to low edge of nFault. If nFault is asserted (interrupt) an interrupt will be generated and this bit is written from a 1 to 0. Bit 3: Read/Write 1 Enables DMA. 0 Disables DMA unconditionally. Bit 2: Read/Write 1 Disables DMA and all of the service interrupts. 0 Enables one of the following cases of interrupts. When one of the service interrupts has occurred, the serviceIntr bit is set to a 1 by hardware. This bit must be reset to 0 to re-enable the interrupts. Writing a 1 to this bit will not cause an interrupt. (a) dmaEn = 1: During DMA this bit is set to a 1 when terminal count is reached. (b) dmaEn = 0 direction = 0: This bit is set to 1 whenever there are writeIntr Threshold or more bytes free in the FIFO. (c) dmaEn = 0 direction = 1: This bit is set to 1 whenever there are readIntr Threshold or more valid bytes to be read from the FIFO. Bit 1: Read only 0 The FIFO has at least 1 free byte. 1 The FIFO cannot accept another byte or the FIFO is completely full. Bit 0: Read only 0 The FIFO contains at least 1 byte of data. 1 The FIFO is completely empty.
7.3.11
Bit Map of ECP Port Registers
D7 D6
PD6 nAck 1
D5
PD5 PError Directio
D4
PD4 Select ackIntEn
D3
PD3 nFault SelectIn
D2
PD2 1 nInit
D1
PD1 1 autofd
D0
PD0
NOTE
2
data ecpAFifo dsr dcr cFifo ecpDFifo tFifo cnfgA cnfgB ecr
PD7 Addr/RLE nBusy 1 ECP Data FIFO Test FIFO 0 compress
Address or RLE field 1 strobe
1 1 2 2 2
Parallel Port Data FIFO
0 intrValue MODE
0 1
1 1 nErrIntrEn
0 1 dmaEn
0 1 serviceIntr
0 1 full
0 1 empty
Notes: 1. These registers are available in all modes. 2. All FIFOs use one common 16-byte FIFO.
-64-
W83977EF-AW/W83977EG-AW
7.3.12 ECP Pin Descriptions
NAME TYPE DESCRIPTION
nStrobe (HostClk) PD<7:0> nAck (PeriphClk)
O I/O I
The nStrobe registers data or address into the slave on the asserting edge during write operations. This signal handshakes with Busy. These signals contains address or data or RLE data. This signal indicates valid data driven by the peripheral when asserted. This signal handshakes with nAutoFd in reverse. This signal deasserts to indicate that the peripheral can accept data. It indicates whether the data lines contain ECP command information or data in the reverse direction. When in reverse direction, normal data are transferred when Busy (PeriphAck) is high and an 8-bit command is transferred when it is low. This signal is used to acknowledge a change in the direction of the transfer (asserted = forward). The peripheral drives this signal low to acknowledge nReverseRequest. The host relies upon nAckReverse to determine when it is permitted to drive the data bus. Indicates printer on line. Requests a byte of data from the peripheral when it is asserted. This signal indicates whether the data lines contain ECP address or data in the forward direction. When in forward direction, normal data are transferred when nAutoFd (HostAck) is high and an 8-bit command is transferred when it is low. Generates an error interrupt when it is asserted. This signal is valid only in the forward direction. The peripheral is permitted (but not required) to drive this pin low to request a reverse transfer during ECP Mode. This signal sets the transfer direction (asserted = reverse, deasserted = forward). This pin is driven low to place the channel in the reverse direction. This signal is always deasserted in ECP mode.
Busy (PeriphAck)
I
PError (nAckReverse)
I
Select (Xflag)
I
nAutoFd (HostAck)
O
nFault (nPeriphRequest)
I
nInit (nReverseRequest) nSelectIn (ECPMode)
O O
-65-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
7.3.13 ECP Operation
The host must negotiate on the parallel port to determine if the peripheral supports the ECP protocol before ECP operation. After negotiation, it is necessary to initialize some of the port bits. The following are required: (a) Set direction = 0, enabling the drivers. (b) Set strobe = 0, causing the nStrobe signal to default to the deasserted state. (c) Set autoFd = 0, causing the nAutoFd signal to default to the deasserted state. (d) Set mode = 011 (ECP Mode) ECP address/RLE bytes or data bytes may be sent automatically by writing the ecpAFifo or ecpDFifo, respectively.
7.3.13.1. Mode Switching
Software will execute P1284 negotiation and all operations prior to a data transfer phase under programmed I/O control (mode 000 or 001). Hardware provides an automatic control line handshake, moving data between the FIFO and the ECP port only in the data transfer phase (mode 011 or 010). If the port is in mode 000 or 001 it may switch to any other mode. If the port is not in mode 000 or 001 it can only be switched into mode 000 or 001. The direction can be changed only in mode 001. When in extended forward mode, the software should wait for the FIFO to be empty before switching back to mode 000 or 001. In ECP reverse mode the software waits for all the data to be read from the FIFO before changing back to mode 000 or 001.
7.3.13.2. Command/Data
ECP mode allows the transfer of normal 8-bit data or 8-bit commands. In the forward direction, normal data are transferred when HostAck is high and an 8-bit command is transferred when HostAck is low. The most significant bits of the command indicate whether it is a run-length count (for compression) or a channel address. In the reverse direction, normal data are transferred when PeriphAck is high and an 8-bit command is transferred when PeriphAck is low. The most significant bit of the command is always zero.
7.3.13.3. Data Compression
The W83977EF supports run length encoded (RLE) decompression in hardware and can transfer compressed data to a peripheral. Note that the odd (RLE) compression in hardware is not supported. In order to transfer data in ECP mode, the compression count is written to the ecpAFifo and the data byte is written to the ecpDFifo.
7.3.14
FIFO Operation
The FIFO threshold is set in configuration register 5. All data transfers to or from the parallel port can proceed in DMA or Programmed I/O (non-DMA) mode, as indicated by the selected mode. The FIFO is used by selecting the Parallel Port FIFO mode or ECP Parallel Port Mode. After a reset, the FIFO is disabled.
-66-
W83977EF-AW/W83977EG-AW
7.3.15 DMA Transfers
DMA transfers are always to or from the ecpDFifo, tFifo, or CFifo. The DMA uses the standard PC DMA services. The ECP requests DMA transfers from the host by activating the PDRQ pin. The DMA will empty or fill the FIFO using the appropriate direction and mode. When the terminal count in the DMA controller is reached, an interrupt is generated and serviceIntr is asserted, which will disable the DMA.
7.3.16
Programmed I/O (NON-DMA) Mode
The ECP or parallel port FIFOs can also be operated using interrupt driven programmed I/O. Programmed I/O transfers are to the ecpDFifo at 400H and ecpAFifo at 000H or from the ecpDFifo located at 400H, or to/from the tFifo at 400H. The host must set the direction, state, dmaEn = 0 and serviceIntr = 0 in the programmed I/O transfers. The ECP requests programmed I/O transfers from the host by activating the IRQ pin. The programmed I/O will empty or fill the FIFO using the appropriate direction and mode.
7.4
Extension FDD Mode (EXTFDD)
In this mode, W83977EF/EG changes the printer interface pins to FDC input/output pins, allowing the user to install a second floppy disk drive (FDD B) through the DB-25 printer connector. The pin assignments for the FDC input/output pins are shown in Table 5-1. After the printer interface is set to EXTFDD mode, the following occur: (1) Pins MOB# and DSB# will be forced to inactive state. (2) PinsDSKCHG#, RDATA#, WP#, TRAK0#, INDEX# will be logically ORed with pins PD4-PD0 to serve as input signals to the FDC. (3) Pins PD4-PD0 each will have an internal resistor of about 1K ohm to serve as pull-up resistor for FDD open drain/collector output. (4) If the parallel port is set to EXTFDD mode after the system has booted DOS or another operating system, a warm reset is needed to enable the system to recognize the extension floppy drive.
7.5
Extension 2FDD Mode (EXT2FDD)
In this mode, W83977EF/EG changes the printer interface pins to FDC input/output pins, allowing the user to install two external floppy disk drives through the DB-25 printer connector to replace internal floppy disk drives A and B. The pin assignments for the FDC input/output pins are shown in Table5-1. After the printer interface is set to EXTFDD mode, the following occur: (1) Pins MOA#, DSA#, MOB#, and DSB# will be forced to inactive state. (2) Pins DSKCHG#, RDATA#, WP#, TRAK0#, and INDEX# will be logically ORed with pins PD4-PD0 to serve as input signals to the FDC. (3) Pins PD4-PD0 each will have an internal resistor of about 1K ohm to serve as pull-up resistor for FDD open drain/collector output. (4) If the parallel port is set to EXT2FDD mode after the system has booted DOS or another operating system, a warm reset is needed to enable the system to recognize the extension floppy drive.
-67-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
8. KEYBOARD CONTROLLER
The KBC (8042 with licensed KB BIOS) circuit of W83977EF/EG is designed to provide the functions needed to interface a CPU with a keyboard and/or a PS/2 mouse, and can be used with IBM(R)compatible personal computers or PS/2-based systems. The controller receives serial data from the keyboard or PS/2 mouse, checks the parity of the data, and presents the data to the system as a byte of data in its output buffer. Then, the controller will assert an interrupt to the system when data are placed in its output buffer. The keyboard and PS/2 mouse are required to acknowledge all data transmissions. No transmission should be sent to the keyboard or PS/2 mouse until an acknowledge is received for the previous data byte.
P24 P25 P21 KINH P17 P20 P27
KIRQ MIRQ GATEA20 KBRST KDAT KCLK MCLK
8042
GP I/O PINS Multiplex I/O PINS P12~P16
P10 P26 T0 P23 T1 P22 P11
MDAT
Keyboard and Mouse Interface
8.1
Output Buffer
The output buffer is an 8-bit read-only register at I/O address 60H (Default, PnP programmable I/O address LD5-CR60 and LD5-CR61). The keyboard controller uses the output buffer to send the scan code received from the keyboard and data bytes required by commands to the system. The output buffer can only be read when the output buffer full bit in the register is "1".
8.2
Input Buffer
The input buffer is an 8-bit write-only register at I/O address 60H or 64H (Default, PnP programmable I/O address LD5-CR60, LD5-CR61, LD5-CR62, and LD5-CR63). Writing to address 60H sets a flag to indicate a data write; writing to address 64H sets a flag to indicate a command write. Data written to I/O address 60H is sent to keyboard (unless the keyboard controller is expecting a data byte) through the controller's input buffer only if the input buffer full bit in the status register is "0".
-68-
W83977EF-AW/W83977EG-AW
8.3 Status Register
The status register is an 8-bit read-only register at I/O address 64H (Default, PnP programmable I/O address LD5-CR62 and LD5-CR63), that holds information about the status of the keyboard controller and interface. It may be read at any time.
BIT BIT FUNCTION DESCRIPTION
0 1 2 3 4 5 6 7
Output Buffer Full Input Buffer Full System Flag Command/Data Inhibit Switch Auxiliary Device Output Buffer General Purpose Timeout Parity Error
0: Output buffer empty 1: Output buffer full 0: Input buffer empty 1: Input buffer full This bit may be set to 0 or 1 by writing to the system flag bit in the command byte of the keyboard controller. It defaults to 0 after a power-on reset. 0: Data byte 1: Command byte 0: Keyboard is inhibited 1: Keyboard is not inhibited 0: Auxiliary device output buffer empty 1: Auxiliary device output buffer full 0: No time-out error 1: Time-out error 0: Odd parity 1: Even parity (error)
-69-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
8.4 Commands
COMMAND FUNCTION
20h
Read Command Byte of Keyboard Controller Write Command Byte of Keyboard Controller
BIT 7 6 Reserved IBM Keyboard Translate Mode Disable Auxiliary Device Disable Keyboard Reserve System Flag Enable Auxiliary Interrupt Enable Keyboard Interrupt BIT DEFINITION
60h
5 4 3 2 1 0
A4h A5h A6h A7h A8h
Test Password Returns 0Fah if Password is loaded Returns 0F1h if Password is not loaded Load Password Load Password until a "0" is received from the system Enable Password Enable the checking of keystrokes for a match with the password Disable Auxiliary Device Interface Enable Auxiliary Device Interface Interface Test
BIT 00 BIT DEFINITION No Error Detected Auxiliary Device "Clock" line is stuck low Auxiliary Device "Clock" line is stuck high Auxiliary Device "Data" line is stuck low Auxiliary Device "Data" line is stuck low
A9h
01 02 03 04
AAh
Self-test Returns 055h if self test succeeds
-70-
W83977EF-AW/W83977EG-AW
Continued.
COMMAND
FUNCTION
Interface Test
BIT 00 BIT DEFINITION No Error Detected Keyboard "Clock" line is stuck low Keyboard "Clock" line is stuck high Keyboard "Data" line is stuck low Keyboard "Data" line is stuck high
ABh
01 02 03 04
ADh AEh C0h C1h C2h D0h D1h D2h D3h D4h E0h FXh
Disable Keyboard Interface Enable Keyboard Interface Read Input Port(P1) and send data to the system Continuously puts the lower four bits of Port1 into STATUS register Continuously puts the upper four bits of Port1 into STATUS register Send Port2 value to the system Only set/reset GateA20 line based on the system data bit 1 Send data back to the system as if it came from Keyboard Send data back to the system as if it came from Auxiliary Device Output next received byte of data from system to Auxiliary Device Reports the status of the test inputs Pulse only RC(the reset line) low for 6S if Command byte is even
8.5
Hardware GATEA20/Keyboard Reset Control Logic
The KBC implements a hardware control logic to speed-up GATEA20 and KBRESET. This control logic is controlled by LD5-CRF0 as follows:
8.5.1
BIT NAME
KB Control Register (Logic Device 5, CR-F0)
7 6 5 4 3 2 1 0
KCLKS1
KCLKS0 Reserved Reserved Reserved
P92EN
HGA20
HKBRST
KCLKS1, KCLKS0 This 2 bits are for the KBC clock rate selection. =00 KBC clock input is 6 Mhz =01 KBC clock input is 8 Mhz =10 KBC clock input is 12 Mhz =11 KBC clock input is 16 Mhz P92EN (Port 92 Enable)
A "1" on this bit enables Port 92 to control GATEA20 and KBRESET. A "0" on this bit disables Port 92 functions.
-71-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
HGA20 (Hardware GATE A20) A "1" on this bit selects hardware GATEA20 control logic to control GATE A20 signal. A "0" on this bit disables hardware GATEA20 control logic function. HKBRST (Hardware Keyboard Reset) A "1" on this bit selects hardware KB RESET control logic to control KBRESET signal. A "0" on this bit disables hardware KB RESET control logic function.
When the KBC receives data that follows a "D1" command, the hardware control logic sets or clears GATE A20 according to the received data bit 1. Similarly, the hardware control logic sets or clears KBRESET depending on the received data bit 0. When the KBC receives a "FE" command, the KBRESET is pulse low for 6S(Min.) with 14S(Min.) delay. GATEA20 and KBRESET are controlled by either the software control or the hardware control logic and they are mutually exclusive. Then, GATEA20 and KBRESET are merged along with Port92 when P92EN bit is set.
8.5.2
BIT NAME
Port 92 Control Register (Default Value = 0x24)
7 6 5 4 3 2 1 0
Res. (0)
Res. (0)
Res. (1)
Res. (0)
Res. (0)
Res. (1)
SGA20
PLKBRST
SGA20 (Special GATE A20 Control) A "1" on this bit drives GATE A20 signal to high. A "0" on this bit drives GATE A20 signal to low. PLKBRST (Pull-Low KBRESET)
A "1" on this bit causes KBRESET to drive low for 6S(Min.) with 14S(Min.) delay. Before issuing another keyboard reset command, the bit must be cleared.
-72-
W83977EF-AW/W83977EG-AW
8.6 OnNow / Security Keyboard and Mouse Wake-Up
---- Programmable Keyboard / Mouse Wake-Up Functions
Winbond's unique programmable keyboard/ mouse Wake-Up functions provide the system diversified methods for either OnNow Wake-Up application, or security control application. The keyboard or mouse can Wake-Up the system by producing a panel switch low pulse on PANSWOT# pin, and connect it to chipset (for example IntelTM chipset TX, LX PIIX4) panel switch input. The Wake-Up conditions can be programmed as pre-determined or any keys/buttons. To implement this function, a 32.768KHz crystal must be installed between XTAL1 and XTAL2, or a 32.768KHz clock to be connected to XTAL1 and leave XTAL2 open. The VSB pin must be connected to +5V VSB of ATX power supply, and an external battery should be installed on VBAT pin to store the data (the passwords and Wake-Up status which had been set already) when power fails.
8.6.1
Keyboard Wake-Up Function
The keyboard Wake-Up function is enable by setting LD-0A CR-E0 bit 6. The pre-determined keys data are stored in registers, and they can be access by an indirection method. At first, write their index address to LD-0A CR-E1, then access them by reading/writing LD-0A CR-E2. A zero data is written to the register means the comparison of this register will be ignored. The pre-programmed keys may be 1 to 5 keys with various combinations. If LD-0A CR-E0 bit 0 is set, the system will be waken up after any key struck.
8.6.2
Keyboard Password Wake-Up Function
To implement this function, the bit 7 of LD-0A CR-E0 must be set, and panel switch input is connected to PANSWIN# pin. Thus PANSWIN# is blocked to PANSWOUT#, by setting LD-0A CR-E0 properly and make only keyboard can Wake-Up the system with preset keys (password).
8.6.3
Mouse Wake-Up Function
The mouse Wake-Up function is activated by setting bit 5 of LD-0A CR-E0. If bit 1 of LD-0A CR-E0 is set, any movement or button clicking will make up the system. Otherwise, the mouse can Wake-Up the system only by clicking its button twice successively with the mouse unmoved. The bit 4 of LD-0A CR-E0 determines which button (left or right) to perform Wake-Up function.
-73-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
9. GENERAL PURPOSE I/O
W83977EF/EG provides 14 Input/Output ports that can be individually configured to perform a simple basic I/O function or a pre-defined alternate function. Those 14 GP I/O ports are divided into three groups, the first group contains 8 ports, and the second group contains only 6 ports. Each port in first group corresponds to a configuration register in logical device 7, and the second group in logical device 8. Users can select those I/O ports functions by independently programming those configuration registers. Figure 8.1, 8.2, and 8.3 respectively show the GP I/O port's structure of logical device 7 and 8. Right after Power-on reset, those ports default to perform basic I/O functions.
Figure 9.1
-74-
W83977EF-AW/W83977EG-AW
Figure 9.2
Figure 9.3
-75-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
9.1 Basic I/O functions
The Basic I/O functions of W83977EF/EG provide several I/O operations including driving a logic value to output port, latching a logic value from input port, inverting the input/output logic value, and steering Common Interrupt (only available in the second group of the GP I/O port). Common Interrupt is the ORed function of all interrupt channels in the second group of the GP I/O ports, and it also connects to a 1ms debounce filter which can reject a noise of 1 ms pulse width or less. There are two 8-bit registers (GP1 and GP2) which are directly connected to those GP I/O ports. Each GP I/O port is represented as a bit in one of three 8-bit registers. Only 6 bits of GP2 are implemented. Table 7.1.1 shows their combinations of Basic I/O functions, and Table 7.1.2 shows the register bit assignments of GP1 and GP2.
Table 9.1.1
I/O BIT 0 = OUTPUT 1 = INPUT ENABLE INT BIT 0 = DISABLE 1 = ENABLE POLARITY BIT 0 = NON INVERT 1 = INVERT BASIC I/O OPERATIONS
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
Basic non-inverting output Basic inverting output Non-inverted output bit value of GP2 drive to Common Interrupt Inverted output bit value of GP2 drive to Common Interrupt Basic non-inverting input Basic inverting input Non-inverted input drive to Common Interrupt Inverted input drive to Common Interrupt
-76-
W83977EF-AW/W83977EG-AW
Table 9.1.2
GP I/O PORT ACCESSED REGISTER REGISTER BIT ASSIGNMENT GP I/O PORT
BIT 0 BIT 1 BIT 2 BIT 3
GP1
GP10 GP11 GP12 GP13 GP14 GP15 GP16 GP17 GP20 GP21 GP22 GP23 GP24 GP25
BIT 4 BIT 5 BIT 6 BIT 7 BIT 0 BIT 1
GP2
BIT 2 BIT 3 BIT 4 BIT 5
-77-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
9.2 Alternate I/O Functions
W83977EF/EG provides several alternate functions which are scattered among the GP I/O ports. Table 9.2.1 shows their assignments. Polarity bit can also be set to alter their polarity.
Table 9.2.1
GP I/O PORT ALTERNATE FUNCTION
GP10 GP11 GP12 GP13 GP14 GP15 GP16 GP17 GP20 GP21 GP22 GP23 GP24 GP25
Interrupt Steering Interrupt Steering Watch Dog Timer Output/IRRX input Power LED output/IRTX output General Purpose Address Decoder/Keyboard Inhibit(P17) General Purpose Write Strobe/ 8042 P12 Watch Dog Timer Output Power LED output Keyboard Reset (8042 P20) 8042 P13 8042 P14 8042 P15 8042 P16 GATE A20 (8042 P21)
9.2.1
Interrupt Steering
GP10, and GP11can be programmed to map their own interrupt channels. The selection of IRQ channel can be done in configuration registers CR70 and CR72 of logical device 7 and logical device 9. Each interrupt channel also has its own 1 ms debounce filter that is used to reject any noise whose width is equal to or less than 1 ms.
9.2.2
Watch Dog Timer Output
Watch Dog Timer contains a one second/minute resolution down counter, CRF2 of Logical Device 8, and two watch Dog control registers, WDT_CTRL0 and WDT_CTRL1 of Logical Device 8. The down counter can be programmed within the range from 1 to 255 seconds/minutes. Writing any new nonzero value to CRF2 or reset signal coming from a Mouse interrupt or Keyboard interrupt (CRF2 also contains non-zero value) will cause the Watch Dog Timer to reload and start to count down from the new value. As the counter reaches zero, (1) Watch Dog Timer time-out occurs and the bit 0 of WDT_CTRL1 will be set to logic 1; (2) Watch Dog interrupt output is asserted if the interrupt is enable in CR72 of logical device 8; and (3) Power LED starts to toggle output if the bit 3 of WDT_CTRL0 is enabled. WDT_CTRL1 also can be accessed through GP2 I/O base address + 1.
-78-
W83977EF-AW/W83977EG-AW
9.2.3 Power LED
The Power LED function provides 1~1/8 Hertz rate toggle pulse output with 50 percent duty cycle. Table 7.2.2 shows how to enable Power LED.
Table 9.2.2
WDT_CTRL1 BIT[1] WDT_CTRL0 BIT[3] WDT_CTRL1 BIT[0] POWER LED STATE
1 0 0 0
X 0 1 1
X X 0 1
Toggle pulse Continuous high or low * Continuous high or low * Toggle pulse
* Note: Continuous high or low depends on the polarity bit of GP13 or GP17 configuration registers.
9.2.4
General Purpose Address Decoder
General Purpose Address Decoder provides two address decode as AEN equal to logic 0. The address base is stored at CR62, CR63, CR64, and CR65 of logical device 7 for GP14 and GP15. The decoding range can be programmed to 1~8 byte boundary. The decoding output is normally active low. Users can alter its polarity through the polarity bit of the GP14 and GP15 configuration register.
-79-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
10. PLUG AND PLAY CONFIGURATION
W83977EF/EG uses Compatible PNP protocol to access configuration registers for setting up different types of configurations. In W83977EF/EG, there are nine Logical Devices (from Logical Device 0 to Logical Device A with the exception of logical device 4 and 6 for compatibility) which correspond to nine individual functions: FDC (logical device 0), PRT (logical device 1), UART1 (logical device 2), UART2 (logical device 3), KBC (logical device 5), GPIO1 (logical device 7), GPIO2 (logical device 8), and ACPI ((logical device A). Each Logical Device has its own configuration registers (above CR30). Host can access those registers by writing an appropriate logical device number into logical device select register at CR7.
10.1 Compatible PnP
10.1.1 Extended Function Registers
In Compatible PnP, there are two ways to enter Extended Function and read or write the configuration registers. HEFRAS (CR26 bit 6) can be used to select one out of these two methods of entering the Extended Function mode as follows:
HEFRAS ADDRESS AND VALUE
0 1
write 87h to the location 3F0h twice write 87h to the location 370h twice
-80-
W83977EF-AW/W83977EG-AW
After Power-on reset, the value on RTSA (pin 43) is latched by HEFRAS of CR26. In Compatible PnP, a specific value (87h) must be written twice to the Extended Functions Enable Register (I/O port address 3F0h or 370h). Secondly, an index value (02h, 07h-FFh) must be written to the Extended Functions Index Register (I/O port address 3F0h or 370h same as Extended Functions Enable Register) to identify which configuration register is to be accessed. The designer can then access the desired configuration register through the Extended Functions Data Register (I/O port address 3F1h or 371h). After programming of the configuration register is finished, an additional value (AAh) should be written to EFERs to exit the Extended Function mode to prevent unintentional access to those configuration registers. The designer can also set bit 5 of CR26 (LOCKREG) to high to protect the configuration registers against accidental accesses. The configuration registers can be reset to their default or hardware settings only by a cold reset (pin MR = 1). A warm reset will not affect the configuration registers.
10.1.2
Extended Functions Enable Registers (EFERs)
After a power-on reset, W83977EF/EG enters the default operating mode. Before W83977EF/EG enters the extended function mode, a specific value must be programmed into the Extended Function Enable Register (EFER) so that the extended function register can be accessed. The Extended Function Enable Registers are write-only registers. On a PC/AT system, their port addresses are 3F0h or 370h (as described in previous section).
10.1.3
Extended Function Registers(EFDRs)
Index
Registers
(EFIRs),
Extended
Function
Data
After the extended function mode is entered, the Extended Function Index Register (EFIR) must be loaded with an index value (02h, 07h-FEh) to access Configuration Register 0 (CR0), Configuration Register 7 (CR07) to Configuration Register FE (CRFE), and so forth through the Extended Function Data Register (EFDR). The EFIRs are write-only registers with port address 3F0h or 370h (as described in section 8.1.1) on PC/AT systems; the EFDRs are read/write registers with port address 3F1h or 371h (as described in section 8.1.1) on PC/AT systems.
10.2 Configuration Sequence
To program W83977EF/EG configuration registers, the following configuration sequence must be followed: (1). Enter the extended function mode (2). Configure the configuration registers (3). Exit the extended function mode
10.2.1
Enter the extended function mode
To place the chip into the extended function mode, two successive wrtites of 0x87 must be applied to Extended Function Enable Registers(EFERs, i.e. 3F0h or 370h).
-81-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
10.2.2 Configurate the configuration registers
The chip selects the logical device and activates the desired logical devices through Extended Function Index Register(EFIR) and Extended Function Data Register(EFDR). EFIR is located at the same address as EFER, and EFDR is located at address (EFIR+1). First, write the Logical Device Number (i.e.,0x07) to the EFIR and then write the number of the desired logical device to the EFDR. If accessing the Chip(Global) Control Registers, this step is not required. Secondly, write the address of the desired configuration register within the logical device to the EFIR and then write (or read) the desired configuration register through EFDR.
10.2.3
Exit the extended function mode
To exit the extended function mode, one write of 0xAA to EFER is required. Once the chip exits the extended function mode, it is in the normal running mode and is ready to enter the configuration mode.
10.2.4 Software programming example The following example is written in Intel 8086 assembly language. It assumes that the EFER is located at 3F0h, so EFIR is located at 3F0h and EFDR is located at 3F1h. If HEFRAS (CR26 bit 6) is set, 3F0h can be directly replaced by 370h and 3F1h replaced by 371h. ;----------------------------------------------------------------------------------; Enter the extended function mode ,interruptible double-write | ;----------------------------------------------------------------------------------MOV DX,3F0H MOV AL,87H OUT DX,AL OUT DX,AL ;----------------------------------------------------------------------------; Configurate logical device 1, configuration register CRF0 | ;----------------------------------------------------------------------------MOV DX,3F0H MOV AL,07H OUT DX,AL ; point to Logical Device Number Reg. MOV DX,3F1H MOV AL,01H OUT DX,AL ; select logical device 1 ; MOV DX,3F0H MOV AL,F0H OUT DX,AL ; select CRF0 MOV DX,3F1H MOV AL,3CH OUT DX,AL ; update CRF0 with value 3CH ;-----------------------------------------; Exit extended function mode | ;-----------------------------------------MOV DX,3F0H MOV AL,AAH OUT DX,AL
-82-
W83977EF-AW/W83977EG-AW
11. ACPI REGISTERS FEATURES
W83977EF/EG supports both ACPI and legacy power managements. The switch logic of the power management block generates an SMI# interrupt in the legacy mode and an SCI# interrupt in the ACPI mode. The new ACPI feature routes SMI#/SCI# logic output either to SMI# or toSCI#. The SMI#/SCI# logic routes to SMI# only when both SCI_EN = 0 and SMISCI_OE = 1.Similarly, the SMI#/SCI# logicroutes to SCI# only when both SCI_EN = 1 and SMISCI_OE = 1.
SCI_EN SMISCI_OE
IRQ events
SMI# / SCI# Logic
0 1
SMISCI_OE
SMI#
SCI#
Device Idle Timers Device Trap Global STBY Timer
IRQs
Sleep/Wake State machine
WAK_STS Clock Control
-83-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
12. CONFIGURATION REGISTER
12.1 Chip (Global) Control Register
CR02 (Default 0x00)
Bit 7 - 1: Reserved. Bit 0: SWRST --> Soft Reset.
CR07
Bit 7 - 0: LDNB7 - LDNB0 --> Logical Device Number Bit 7 - 0
CR20
Bit 7 - 0: DEVIDB7 - DEBIDB0 --> Device ID Bit 7 - Bit 0 = 0x52 (read only).
CR21
Bit 7 - 0: DEVREVB7 - DEBREVB0 --> Device Rev Bit 7 - Bit 0 = 0xFx (read only).
CR22 (Default 0xff)
Bit 7 - 6: Reserved. Bit 5: URBPWD = 0 Power down = 1 No Power down Bit 4: URAPWD = 0 Power down = 1 No Power down Bit 3: PRTPWD = 0 Power down = 1 No Power down Bit 2, 1: Reserved. Bit 0: FDCPWD = 0 Power down = 1 No Power down
CR23 (Default 0xFE)
Bit 7 - 1: Reserved. Bit 0: IPD (Immediate Power Down). When set to 1, it will put the whole chip into power down mode immediately.
-84-
W83977EF-AW/W83977EG-AW
CR24 (Default 0b1s000s0s)
Bit 7: EN16SA = 0 12 bit Address Qualification = 1 16 bit Address Qualification Bit 6: EN48 = 0 The clock input on Pin 1 should be 24 Mhz. = 1 The clock input on Pin 1 should be 48 Mhz. The corresponding power-on setting pin is SOUTB (pin 53). Bit 5 - 3: Reserved. Bit 2: ENKBC = 0 KBC is disabled after hardware reset. = 1 KBC is enabled after hardware reset. This bit is read only, and set/reset by power-on setting pin. The corresponding power-on setting pin is SOUTA (pin 46). Bit 1: Reserved Bit 0: PNPCSV# = 0 The Compatible PnP address select registers have default values. = 1 The Compatible PnP address select registers have no default value. When trying to make a change to this bit, new value of PNPCSV# must be complementary to the old one to make an effective change. For example, the user must set PNPCSV# to 0 first and then reset it to 1 to reset these PnP registers if the present value of PNPCSV# is 1. The corresponding power-on setting pin is NDTRA (pin 44).
CR25 (Default 0x00)
Bit 7 - 6: Reserved Bit 5: URBTRI Bit 4: URATRI Bit 3: PRTTRI Bit 2 - 1 : Reserved Bit 0: FDCTRI.
-85-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
CR26 (Default 0b0s000000)
Bit 7: SEL4FDD =0 =1 Select two FDD mode. Select four FDD mode.
Bit 6: HEFRAS These two bits define how to enable Configuration mode. The corresponding power-on setting pin is NRTSA (pin 43). HEFRAS Address and Value = 0 Write 87h to the location 3F0h twice. = 1 Write 87h to the location 370h twice. Bit 5: LOCKREG = 0 Enable R/W Configuration Registers. = 1 Disable R/W Configuration Registers. Bit 4: Reserved. Bit 3: DSFDLGRQ = 0 Enable FDC legacy mode on IRQ and DRQ selection, then DO register bit 3 is effective on selecting IRQ = 1 Disable FDC legacy mode on IRQ and DRQ selection, then DO register bit 3 is not effective on selecting IRQ Bit 2: DSPRLGRQ = 0 Enable PRT legacy mode on IRQ and DRQ selection, then DCR bit 4 is effective on selecting IRQ = 1 Disable PRT legacy mode on IRQ and DRQ selection, then DCR bit 4 is not effective on selecting IRQ Bit 1: DSUALGRQ = 0 Enable UART A legacy mode IRQ selecting, then MCR bit 3 is effective on selecting IRQ = 1 Disable UART A legacy mode IRQ selecting, then MCR bit 3 is not effective on selecting IRQ Bit 0: DSUBLGRQ = 0 Enable UART B legacy mode IRQ selecting, then MCR bit 3 is effective on selecting IRQ = 1 Disable UART B legacy mode IRQ selecting, then MCR bit 3 is not effective on selecting IRQ
-86-
W83977EF-AW/W83977EG-AW
CR28 (Default 0x00)
Bit 7 - 5: Reserved. Bit 4: IRQ Sharing selection. =0 =1 Disable IRQ Sharing Enable IRQ Sharing
Bit 3:Reserved Bit 2 - 0: PRTMODS2 - PRTMODS0 = 0xx Parallel Port Mode = 100 Reserved = 101 External FDC Mode = 110 Reserved = 111 External two FDC Mode
CR2A (Default 0x00)
Bit 7: PIN57S = 0 KBRST = 1 GP12 Bit 6: PIN56S =0 =1 GA20 GP11
Bit 5 - 4: PIN40S1, PIN40S0 = 00 CIRRX = 01 GP24 = 10 8042 P13 = 11 Reserved Bit 3 - 2: PIN39S1, PIN39S0 = 00 SUSCIN# = 01 Reserved = 10 GP25 = 11 Reserved Bit 1 - 0: PIN3S1, PIN3S0 = 00 DRVDEN1 = 01 GP10 = 10 8042 P12 = 11 SCI#
-87-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
CR2B (Default 0x00)
Bit 7 - 6: PIN73S1, PIN73S0 = 00 PANSWIN# = 01 GP23 = 10 Reserved = 11 Reserved Bit 5: PIN72S =0 =1 PANSWOUT# GP22
Bit 4 - 3: PIN70S1, PIN70S0 = 00 SMI# = 01 GP21 = 10 8042 P16 = 11 Reserved Bit 2 - 1: PIN69S1, PIN69S0 = 00 PWRCTL# = 01 GP20 = 10 = 11 =0 =1 Reserved Reserved KBLOCK GP13
Bit 0: PIN58S
CR2C (Default 0x00)
Bit 7 - 6: PIN121S1, PIN121S0 = 00 DRQ0 = 01 GP17 = 10 8042 P14 = 11 SCI# Bit 5 - 4: PIN119S1, PIN119S0 = 00 NDACK0 = 01 GP16 = 10 8042 P15 = 11 Reserved Bit 3 - 2: PIN104S1, PIN104S0 = 00 IRQ15
-88-
W83977EF-AW/W83977EG-AW
= 01 GP15 = 10 WDTO = 11 Reserved Bit 1 - 0: PIN103S1, PIN103S0 = 00 IRQ14 = 01 GP14 = 10 PLEDO = 11 Reserved
CR2D (Default 0x00)
Test Modes: Reserved for Winbond.
CR2E (Default 0x00)
Test Modes: Reserved for Winbond.
CR2F (Default 0x00)
Test Modes: Reserved for Winbond.
-89-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
12.2 Logical Device 0 (FDC)
CR30 (Default 0x01 if PNPCSV# = 0 during POR, default 0x00 otherwise)
Bit 7 - 1: Reserved. Bit 0: = 1 Activates the logical device. = 0 Logical device is inactive.
CR60, CR 61 (Default 0x03, 0xf0 if PNPCSV# = 0 during POR, default 0x00, 0x00 otherwise)
These two registers select FDC I/O base address [0x100:0xFF8] on 8 byte boundary.
CR70 (Default 0x06 if PNPCSV# = 0 during POR, default 0x00 otherwise)
Bit 7 - 4: Reserved. Bit 3 - 0: These bits select IRQ resource for FDC.
CR74 (Default 0x02 if PNPCSV# = 0 during POR, default 0x04 otherwise)
Bit 7 - 3: Reserved. Bit 2 - 0: These bits select DRQ resource for FDC. = 0x00 DMA0 = 0x01 DMA1 = 0x02 DMA2 = 0x03 DMA3 = 0x04 - 0x07 No DMA active
CRF0 (Default 0x0E)
FDD Mode Register Bit 7: FIPURDWN This bit controls the internal pull-up resistors of the FDC input pins RDATA, INDEX, TRAK0, DSKCHG, and WP. =0 =1 The internal pull-up resistors of FDC are turned on.(Default) The internal pull-up resistors of FDC are turned off.
Bit 6: INTVERTZ This bit determines the polarity of all FDD interface signals. =0 =1 FDD interface signals are active low. FDD interface signals are active high.
Bit 5: DRV2EN (PS2 mode only) When this bit is a logic 0, this indicates that a second drive is installed and is reflected in status register A. Bit 4: Swap Drive 0, 1 Mode =0 =1 = 11 No Swap (Default) Drive and Motor sel 0 and 1 are swapped. AT Mode (Default)
-90-
Bit 3 - 2 Interface Mode
W83977EF-AW/W83977EG-AW
= 10 (Reserved) = 01 PS/2 = 00 Model 30 Bit 1: FDC DMA Mode = 0 Burst Mode is enabled = 1 Non-Burst Mode (Default) Bit 0: Floppy Mode = 0 Normal Floppy Mode (Default) = 1 Enhanced 3-mode FDD
CRF1 (Default 0x00)
Bit 7 - 6: Boot Floppy = 00 FDD A = 01 FDD B = 10 FDD C = 11 FDD D Bit 5, 4: Media ID1, Media ID0. These bits will be reflected on FDC's Tape Drive Register bit 7, 6. Bit 3 - 2: Density Select = 00 Normal (Default) = 01 Normal = 10 1 ( Forced to logic 1) = 11 0 ( Forced to logic 0) Bit 1: DISFDDWR = 0 Enable FDD write. = 1 Disable FDD write(forces pins WE, WD stay high). Bit 0: SWWP = 0 Normal, use WP to determine whether the FDD is write protected or not. = 1 FDD is always write-protected.
-91-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
CRF2 (Default 0xFF)
Bit 7 - 6: FDD D Drive Type Bit 5 - 4: FDD C Drive Type Bit 3 - 2: FDD B Drive Type Bit 1:0: FDD A Drive Type When FDD is in enhanced 3-mode(CRF0.bit0=1),these bits determine SELDEN value in TABLE A of CRF4 and CRF5 as follows.
DTYPE1 DPYTE0 DRATE1 DRATE0 SELDEN
0 0 0 0 0 1 1
Note: X means don't care.
0 0 0 0 1 0 1
1 0 0 1 X X 0
1 0 1 0 X X 1
1 1 0 0 0 1 0
CRF4 (Default 0x00)
FDD0 Selection: Bit 7: Reserved. Bit 6: Precomp. Disable. =1 =0 Disable FDC Precompensation. Enable FDC Precompensation.
Bit 5: Reserved. Bit 4 - 3: DRTS1, DRTS0: Data Rate Table select (Refer to TABLE A). = 00 Select Regular drives and 2.88 format = 01 Specifical application = 10 2 Meg Tape = 11 Reserved Bit 2: Reserved. Bit 1:0: DMOD0, DMOD1 : Drive Model select (Refer to TABLE B).
-92-
W83977EF-AW/W83977EG-AW
CRF5 (Default 0x00)
FDD1 Selection: Same as FDD0 of CRF4.
TABLE A
DRIVE RATE TABLE SELECT DRTS1 DRTS0 DATA RATE DRATE1 DRATE0 SELECTED DATA RATE MFM FM SELDEN CRF0 BIT 0=0
1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 0 1
1 0 1 0 1 0 1 0 1 0 1 0
1Meg 500K 300K 250K 1Meg 500K 500K 250K 1Meg 500K 2Meg 250K
--250K 150K 125K --250K 250K 125K --250K --125K
1 1 0 0 1 1 0 0 1 1 0 0
Note:Refer to CRF2 for SELDEN value in the cases when CRF0, bit0=1.
TABLE B
DMOD0 DMOD1 DRVDEN0(PIN 2) DRVDEN1(PIN 3) DRIVE TYPE
0
0
SELDEN
DRATE0
4/2/1 MB 3.5"" 2/1 MB 5.25" 2/1.6/1 MB 3.5" (3-MODE)
0 1 1
1 0 1
DRATE1
SELDEN
DRATE0 DRATE0 DRATE1
DRATE0
-93-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
12.3 Logical Device 1 (Parallel Port)
CR30 (Default 0x01 if PNPCSV# = 0 during POR, default 0x00 otherwise) Bit 7 - 1: Reserved. Bit 0: = 1 Activates the logical device. = 0 Logical device is inactive. CR60, CR 61 (Default 0x03, 0x78 if PNPCSV# = 0 during POR, default 0x00, 0x00 otherwise) These two registers select Parallel Port I/O base address. [0x100:0xFFC] on 4 byte boundary (EPP not supported) or [0x100:0xFF8] on 8 byte boundary (all modes supported, EPP is only available when the base address is on 8 byte boundary). CR70 (Default 0x07 if PNPCSV# = 0 during POR, default 0x00 otherwise) Bit 7 - 4: Reserved. Bit [3:0]: These bits select IRQ resource for Parallel Port. CR74 (Default 0x04) Bit 7 - 3: Reserved. Bit 2 - 0: These bits select DRQ resource for Parallel Port. 0x00=DMA0 0x01=DMA1 0x02=DMA2 0x03=DMA3 0x04 - 0x07= No DMA active CRF0 (Default 0x3F) Bit 7: PP Interrupt Type: Not valid when the parallel port is in the printer Mode (100) or the standard & Bi-directional Mode (000). = 1 Pulsed Low, released to high-Z . = 0 IRQ follows nACK when parallel port in EPP Mode or [Printer, SPP, EPP] under ECP. Bit [6:3]: ECP FIFO Threshold. Bit 2 - 0 Parallel Port Mode = 100 Printer Mode (Default) = 000 Standard and Bi-direction (SPP) mode = 001 EPP - 1.9 and SPP mode = 101 EPP - 1.7 and SPP mode = 010 ECP mode = 011 ECP and EPP - 1.9 mode = 111 ECP and EPP - 1.7 mode.
-94-
W83977EF-AW/W83977EG-AW
12.4 Logical Device 2 (UART A))
CR30 (Default 0x01 if PNPCSV# = 0 during POR, default 0x00 otherwise)
Bit 7 - 1: Reserved. Bit 0: = 1 Activates the logical device. = 0 Logical device is inactive.
CR60, CR 61 (Default 0x03, 0xF8 if PNPCSV# = 0 during POR, default 0x00, 0x00 otherwise)
These two registers select Serial Port 1 I/O base address [0x100:0xFF8] on 8 byte boundary.
CR70 (Default 0x04 if PNPCSV# = 0 during POR, default 0x00 otherwise)
Bit 7 - 4: Reserved. Bit 3 - 0: These bits select IRQ resource for Serial Port 1.
CRF0 (Default 0x00)
Bit 7 - 2: Reserved. Bit 1 - 0: SUACLKB1, SUACLKB0 = 00 = 01 = 10 = 11 UART A clock source is 1.8462 Mhz (24MHz/13) UART A clock source is 2 Mhz (24MHz/12) UART A clock source is 24 Mhz (24MHz/1) UART A clock source is 14.769 Mhz (24MHz/1.625)
12.5 Logical Device 3 (UART B)
CR30 (Default 0x01 if PNPCSV# = 0 during POR, default 0x00 otherwise)
Bit 7 - 1: Reserved. Bit 0: = 1 Activates the logical device. = 0 Logical device is inactive.
CR60, CR 61 (Default 0x02, 0xF8 if PNPCSV# = 0 during POR, default 0x00, 0x00 otherwise)
These two registers select Serial Port 2 I/O base address [0x100:0xFF8] on 8 byte boundary.
CR70 (Default 0x03 if PNPCSV# = 0 during POR, default 0x00 otherwise)
Bit 7 - 4: Reserved. Bit [3:0]: These bits select IRQ resource for Serial Port 2.
-95-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
CRF0 (Default 0x00)
Bit 7 - 4: Reserved. Bit 3: RXW4C =0 =1 No reception delay when SIR is changed from TX mode to RX mode. Reception delays 4 characters-time (40 bit-time) when SIR is changed from TX mode to RX mode. No transmission delay when SIR is changed from RX mode to TX mode. Transmission delays 4 characters-time (40 bit-time) when SIR is changed from RX mode to TX mode. UART B clock source is 1.8462 Mhz (24MHz/13) UART B clock source is 2 Mhz (24MHz/12) UART B clock source is 24 Mhz (24MHz/1) UART B clock source is 14.769 Mhz (24MHz/1.625)
Bit 2: TXW4C =0 =1
Bit 1 - 0: SUBCLKB1, SUBCLKB0 = 00 = 01 = 10 = 11
CRF1 (Default 0x00)
Bit 7: Reserved. Bit 6: IRLOCSEL. IR I/O pins' location select. =0 =1 Through SINB/SOUTB. Through IRRX/IRTX.
Bit 5: IRMODE2. IR function mode selection bit 2. Bit 4: IRMODE1. IR function mode selection bit 1. Bit 3: IRMODE0. IR function mode selection bit 0.
IR MODE IR FUNCTION IRTX IRRX
00X 010* 011* 100 101 110 111*
Disable IrDA IrDA ASK-IR ASK-IR ASK-IR ASK-IR
tri-state Active pulse 1.6 S Active pulse 3/16 bit time Inverting IRTX/SOUTB pin Inverting IRTX/SOUTB & 500 KHZ clock Inverting IRTX/SOUTB Inverting IRTX/SOUTB & 500 KHZ clock
high Demodulation into SINB/IRRX Demodulation into SINB/IRRX routed to SINB/IRRX routed to SINB/IRRX Demodulation into SINB/IRRX Demodulation into SINB/IRRX
Note: The notation is normal mode in the IR function.
Bit 2: HDUPLX. IR half/full duplex function select. =0 The IR function is Full Duplex. =1 The IR function is Half Duplex.
-96-
W83977EF-AW/W83977EG-AW
Bit 1: TX2INV. =0 the SOUTB pin of UART B function or IRTX pin of IR function in normal condition. =1 inverse the SOUTB pin of UART B function or IRTX pin of IR function. Bit 0: RX2INV. =0 the SINB pin of UART B function or IRRX pin of IR function in normal condition. =1 inverse the SINB pin of UART B function or IRRX pin of IR function
12.6 Logical Device 5 (KBC)
CR30 (Default 0x01 if PENKBC= 1 during POR, default 0x00 otherwise)
Bit 7 - 1: Reserved. Bit 0: = 1 Activates the logical device. = 0 Logical device is inactive.
CR60, CR 61 (Default 0x00, 0x60 if PENKBC= 1 during POR, default 0x00 otherwise)
These two registers select the first KBC I/O base address [0x100:0xFFF] on 1 byte boundary.
CR62, CR 63 (Default 0x00, 0x64 if PENKBC= 1 during POR, default 0x00 otherwise)
These two registers select the second KBC I/O base address [0x100:0xFFF] on 1 byte boundary.
CR70 (Default 0x01 if PENKBC= 1 during POR, default 0x00 otherwise)
Bit 7 - 4: Reserved. Bit [3:0]: These bits select IRQ resource for KINT (keyboard).
CR72 (Default 0x0C if PENKBC= 1 during POR, default 0x00 otherwise)
Bit 7 - 4: Reserved. Bit [3:0]: These bits select IRQ resource for MINT (PS2 Mouse)
CRF0 (Default 0x83)
Bit 7 - 6: KBC clock rate selection = 00 Select 6MHz as KBC clock input. = 01 Select 8MHz as KBC clock input. = 10 Select 12Mhz as KBC clock input. = 11 Select 16Mhz as KBC clock input. Bit 5 - 3: Reserved. Bit 2: = 0 Port 92 disable. = 1 Port 92 enable. Bit 1: = 0 Gate20 software control. = 1 Gate20 hardware speed up. Bit 0: = 0 KBRST software control. = 1 KBRST hardware speed up.
-97-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
12.7 Logical Device 7 (GP I/O Port I)
CR30 (Default 0x00)
Bit 7 - 1: Reserved. Bit 0: = 1 Activates the logical device. = 0 Logical device is inactive.
CR60, CR 61 (Default 0x00, 0x00)
These two registers select GP1 I/O base address [0x100:0xFFF] on 1 byte boundary.
CR62, CR 63 (Default 0x00, 0x00)
These two registers select GP14 alternate function Primary I/O base address [0x100:0xFFx] on 1~8 byte boundary; They are available as you setting GP14 to be an alternate function (General Purpose Address Decode).
CR64, CR 65 (Default 0x00, 0x00)
These two registers select GP15 alternate function Primary I/O base address [0x100:0xFFx] on 1~8 byte boundary; They are available as you setting GP15 to be an alternate function (General Purpose Address Decode).
CR70 (Default 0x00)
Bit 7 - 4: Reserved. Bit 3 - 0: These bits select IRQ resource for GP10 as you setting GP10 to be an alternate function (Interrupt Steering).
CR72 (Default 0x00)
Bit 7 - 4: Reserved. Bit 3 - 0: These bits select IRQ resource for GP11 as you setting GP11 to be an alternate function (Interrupt Steering).
CRE0 (GP10, Default 0x01)
Bit 7 - 5: Reserved. Bit 4: IRQ Filter Select = 1 Debounce Filter Enabled = 0 Debounce Filter Bypassed Bit 3: Select Function. = 1 Select Alternate Function: Interrupt Steering. = 0 Select Basic I/O Function. Bit 2: Reserved. Bit 1: Polarity. = 1 Invert. = 0 No Invert. Bit 0: In/Out selection. = 1 Input. = 0 Output.
-98-
W83977EF-AW/W83977EG-AW
CRE1 (GP11, Default 0x01)
Bit 7 - 5: Reserved. Bit 4: IRQ Filter Select = 1 Debounce Filter Enabled = 0 Debounce Filter Bypassed Bit 3: Select Function. = 1 Select Alternate Function: Interrupt Steering. = 0 Select Basic I/O Function. Bit 2: Reserved. Bit 1: Polarity. = 1 Invert. = 0 No Invert. Bit 0: In/Out selection. = 1 Input. = 0 Output.
CRE2 (GP12, Default 0x01) Bit 7 - 5: Reserved. Bit 4 - 3: Select Function. = 00 Select Basic I/O function. = 01 Select 1st alternate function: Watch Dog Timer Output. = 10 Reserved = 11 Reserved Bit 2: Reserved. Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output CRE3 (GP13, Default 0x01) Bit 7 - 5: Reserved. Bit 4 - 3: Select Function. = 00 Select Basic I/O function. = 01 Select 1st alternate function: Power LED output. = 10 Reserved = 11 Reserved Bit 2: Reserved. Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output CRE4 (GP14, Default 0x01) Bit 7 - 6: = 00 Address decoder is 1-Byte boundary.
-99-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
= 01 Address decoder is 2-Byte boundary. = 10 Address decoder is 4-Byte boundary. = 11 Address decoder is 8-Byte boundary. Bit 5: Reserved. Bit 4 - 3: Select Function. = 00 Select Basic I/O function. = 01 Select 1st alternate function: General Purpose Address Decoder(Active Low when Bit 1 = 0, Decode two byte address). = 10 Select 2nd alternate function: Keyboard Inhibit(P17). = 11 Reserved Bit 2: Reserved. Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output
CRE5 (GP15, Default 0x01)
Bit 7 - 6: = 00 Address decoder is 1-Byte boundary. = 01 Address decoder is 2-Byte boundary. = 10 Address decoder is 4-Byte boundary. = 11 Address decoder is 8-Byte boundary. Bit 5: Reserved. Bit 4 - 3: Select Function. = 00 Select Basic I/O function. = 01 General Purpose Write Strobe(Active Low when Bit 1 = 0). = 10 8042 P12. = 11 Reserved Bit 2: Reserved. Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output
CRE6 (GP16, Default 0x01)
Bit 7 - 5: Reserved. Bit 4 - 3: Select Function. = 00 Select Basic I/O function. = 01 Select 1st alternate function: Watch Dog Timer Output. = 1x Reserved Bit 2: Reserved. Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output
CRE7 (GP17, Default 0x01) -100-
W83977EF-AW/W83977EG-AW
Bit 7 - 4: Reserved. Bit 4 - 3: Select Function. = 00 Select Basic I/O function. = 01 Select 1st alternate function: Power LED output. Please refer to TABLE C = 1x Reserved Bit 2: Reserved. Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output
TABLE C WDT_CTRL1* BIT[1]* WDT_CTRL0* BIT[3] WDT_CTRL1 BIT[0] POWER LED STATE
1 0 0 0
X 0 1 1
X X 0 1
1 Hertz Toggle pulse Continuous high or low* Continuous high or low* 1 Hertz Toggle pulse
*Note: 1). Regarding to the contents of WDT_CTR1 and WDT_CTRL0, please refer to CRF3 and CRF4 in Logic Device 8. 2). Continuous high or low depends on the polarity bit of GP13 or GP17 configure registers.
CRF1 ( Default 0x00) General Purpose Read/Write Enable* Bit 7 - 2: Reserved Bit 1: = 1 Enable GP15 General Purpose Address Decode = 0 Disable GP15 General Purpose Address Decode Bit 0: = 1 Enable GP14 General Purpose Address Decode = 0 Disable GP14 General Purpose Address Decode
*Note: If the logical device's activate bit is not set then bit 0 and 1 have no effect.
12.8 Logical Device 8 (GP I/O Port II)
CR30 (Default 0x00)
Bit 7 - 1: Reserved. Bit 0: = 1 Activates the logical device. = 0 Logical device is inactive.
CR60, CR 61 (Default 0x00, 0x00)
These two registers select GP2 & Watch Dog I/O base address [0x100:0xFFE] on 2 byte boundary. I/O base address + 1: Watch Dog I/O base address.
-101-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
CR70 (Default 0x00)
Bit 7 - 4: Reserved. Bit 3 - 0: These bits select IRQ resource for Common IRQ of GP20~GP26 at Logic Device 8.
CR72 (Default 0x00) Bit 7 - 4: Reserved. Bit 3 - 0: These bits select IRQ resource for Watch Dog. CRE8 (GP20, Default 0x01) Bit 7 - 5: Reserved. Bit 4 - 3: Select Function. = 00 Select basic I/O function = 01 Reserved = 10 Select alternate function: Keyboard Reset (connected to KBC P20) = 11 Reserved Bit 2: Int En = 1 Enable Common IRQ = 0 Disable Common IRQ Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output CRE9 (GP21, Default 0x01) Bit 7 - 5: Reserved Bit 4 - 3: Select Function. = 00 Select Basic I/O function = 01 Reserved = 10 Select 2nd alternate function: Keyboard P13 I/O = 11 Reserved Bit 2: Int En = 1 Enable Common IRQ = 0 Disable Common IRQ Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output CREA (GP22, Default 0x01) Bit 7 - 5: Reserved. Bit 4 - 3: Select Function. = 00 Select Basic I/O function. = 01 Reserved = 10 Select 2nd alternate function: Keyboard P14 I/O. = 11 Reserved Bit 2: Int En = 1 Enable Common IRQ = 0 Disable Common IRQ Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output CREB (GP23, Default 0x01)
-102-
W83977EF-AW/W83977EG-AW
Bit 7 - 5: Reserved. Bit 4 - 3: Select Function. = 00 Select Basic I/O function = 01 Reserved = 10 Select 2nd alternate function: Keyboard P15 I/O = 11 Reserved Bit 2: Int En =1 =0 Enable Common IRQ Disable Common IRQ
Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output
CREC (GP24, Default 0x01)
Bit 7 - 5: Reserved. Bit 4 - 3: Select Function. = 00 Select Basic I/O function = 01 Reserved = 10 Select 2nd alternate function: Keyboard P16 I/O = 11 Reserved Bit 2: Int En =1 =0 Enable Common IRQ Disable Common IRQ
Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output
CRED (GP25, Default 0x01)
Bit 7 - 4: Reserved. Bit 3: Select Function. = 1 Select alternate function: GATE A20(Connect to KBC P21). = 0 Select basic I/O function Bit 2: Int En =1 =0 Enable Common IRQ Disable Common IRQ
Bit 1: Polarity: 1: Invert, 0: No Invert Bit 0: In/Out: 1: Input, 0: Output
CRF0 (Default 0x00)
Debounce Filter Enable or Disable for General Purpose I/O Combined Interrupt. The Debounce Filter can reject a pulse with 1ms width or less. Bit 7 - 4: Reserved Bit 3: GP Common IRQ Filter Select
Publication Release Date: Apr. 2006 Revision 1.2
-103-
W83977EF-AW/W83977EG-AW
= 1 Debounce Filter Enabled = 0 Debounce Filter Bypassed Bit 2 - 0: Reserved
CRF1 (Reserved) CRF2 (Default 0x00)
Watch Dog Timer Time-out value. Writing a non-zero value to this register causes the counter to load the value to Watch Dog Counter and start to count down. If the Bit2 and Bit 1 are set, any Mouse Interrupt or Keyboard Interrupt happen will also cause to reload the non-zero value to Watch Dog Counter and count down. Read this register can not access Watch Dog Timer Time-out value, but can access the current value in Watch Dog Counter. Bit 7 - 0: = 0x00 Time-out Disable = 0x01 Time-out occurs after 1 minute/second = 0x02 Time-out occurs after 2 minutes/seconds = 0x03 Time-out occurs after 3 minutes/seconds ................................................ = 0xFF Time-out occurs after 255 minutes
CRF3 (WDT_CTRL0, Default 0x00)
Watch Dog Timer Control Register #0 Bit 7 - 4: Reserved Bit 3: When Time-out occurs, Enable or Disable Power LED with 1 Hz and 50% duty cycle output. = 1 Enable = 0 Disable Bit 2: Mouse interrupt reset Enable or Disable = 1 Watch Dog Timer is reset upon a Mouse interrupt = 0 Watch Dog Timer is not affected by Mouse interrupt Bit 1: Keyboard interrupt reset Enable or Disable = 1 Watch Dog Timer is reset upon a Keyboard interrupt = 0 Watch Dog Timer is not affected by Keyboard interrupt Bit 0: Reserved.
CRF4 (WDT_CTRL1, Default 0x00)
Watch Dog Timer Control Register #1 Bit 7: Reserved
Bit 6: = 1 Watch Dog counter counts in seconds. = 0 Watch Dog counter counts in minutes.
Bit 5-4: Power LED toggle pulse frequency select = 00 Power LED toggle pulse frequency is 1Hz
-104-
W83977EF-AW/W83977EG-AW
= 01 Power LED toggle pulse frequency is 1/2Hz = 10 Power LED toggle pulse frequency is 1/4Hz = 11 Power LED toggle pulse frequency is 1/8Hz Bit 3: Enable the rising edge of Keyboard Reset(P20) to force Time-out event, R/W* = 1 Enable = 0 Disable Bit 2: Force Watch Dog Timer Time-out, Write only* = 1 Force Watch Dog Timer time-out event; this bit is self-clearing. Bit 1: Enable Power LED toggle pulse with 50% duty cycle , R/W = 1 Enable = 0 Disable Bit 0: Watch Dog Timer Status, R/W = 1 Watch Dog Timer time-out occurred. = 0 Watch Dog Timer counting
*Note: 1). Internal logic provides an 1us Debounce Filter to reject the width of P20 pulse less than 1us. 2). The P20 signal that coming from Debounce Filter is ORed with the signal generated by the Force Time-out bit and then connect to set the Bit 0(Watch Dog Timer Status). The ORed signal is self-clearing.
12.9 Logical Device A (ACPI)
CR30 (Default 0x00)
Bit 7 - 1: Reserved. Bit 0: = 1 Activates the logical device. = 0 Logical device is inactive.
CR70 (Default 0x00)
Bit 7 - 4: Reserved. Bit 3 - 0: These bits select IRQ resources for SCI#.
CRE0 (Default 0x00)
Bit 7: DIS-PANSWIN. Disable panel switch input to turn system power supply on. =0 =1 =0 =1 =0 =1 =0 PANSWIN# is wire-ANDed and connected to PANSWOUT#. PANSWIN# is blocked and can not affect PANSWOUT#. Disable Keyboard Wake-Up function. Enable Keyboard Wake-Up function. Disable Mouse Wake-Up function. Enable Mouse Wake-Up function. Select click on Mouse Left-botton to Wake the system up.
Publication Release Date: Apr. 2006 Revision 1.2
Bit 6: ENKBWAKEUP. Enable Keyboard to Wake-Up system via PANSWOUT#.
Bit 5: ENMSWAKEUP. Enable Mouse to Wake-Up system via PANSWOUT#.
Bit 4: MSRKEY. Select Mouse Left/Right Botton to Wake-Up system via PANSWOUT#.
-105-
W83977EF-AW/W83977EG-AW
=1 Select click on Mouse right-botton to Wake the system up.
Bit 3: Reserved. Bit 2: KB/MS Swap. Enable Keyboard/Mouse port-swap. =0 =1 =0 =1 =0 =1 Keyboard/Mouse ports are not swapped. Keyboard/Mouse ports are swapped. Just clicking Mouse left/right-botton twice can Wake the system up. Just clicking Mouse left/right-botton once can Wake the system up. Only predetermined specific key combination can Wake-Up the system. Any character received from Keyboard can Wake-Up the system.
Bit 1: MSXKEY. Enable any character received from Mouse to Wake-Up the system.
Bit 0: KBXKEY. Enable any character received from Keyboard to Wake-Up the system.
CRE1 (Default 0x00) Keyboard Wake-Up Index Register
This register is used to indicate which Keyboard Wake-Up Shift register or Predetermined key Register is to be read/written via CRE2. The range of Keyboard Wake-Up index register is 0x00 0x0E,
CRE2 Keyboard Wake-Up Data Register CRE3 (Read only) Keyboard/Mouse Wake-Up Status Register
Bit 7-4: Reserved. Bit 4: POWERRESUME_STS. The bit is set after powerloss occured and cleared by reading this register. Bit 3: Revered Bit 2: PANSW_STS. The Panel switch event is caused by PANSWIN#. This bit is cleared by reading this register. Bit 1: Mouse_STS. The Panel switch event is caused by Mouse Wake-Up event. This bit is cleared by reading this register. Bit 0: Keyboard_STS. The Panel switch event is caused by Keyboard Wake-Up event. This bit is cleared by reading this register.
CRE4 OnNow/Powerloss Control Register.
Bit 7: Powerloss Control bit 2. Bit 6: Powerloss Control bit 1. Bit 5: Powerloss Control bit 0. Bit 4: 32KHz clock source select. Bit 3: Reserved. Bit 2: Reserved. Bit 1-0: Reserved.
CRE5 (Default 0x00)
Bit 7: Reserved. Bit 6 - 0: Compared Code Length. When the compared codes are storaged in the data register,
-106-
W83977EF-AW/W83977EG-AW
these data length should be written to this register.
CRE6 (Default 0x00)
Bit 7 - 0: Reserved.
CRE7 (Default 0x00)
Bit 7 - 3: Reserved. Bit 2: Reserved Bit 1: Invert RX Data. = 1 Inverting RX Data. = 0 Not inverting RX Data. Bit 0: Enable Demodulation. = 1 Enable received signal to demodulate. = 0 Disable received signal to demodulate.
CRF0 (Default 0x00)
Bit 7: CHIPPME. Chip level auto power management enable. =0 =1 =0 =1 disable the auto power management functions enable the auto power management functions. disable the auto power management functions. enable the auto power management functions.
Bit 6: URCPME. UART C auto power management enable.
Bit 5 - 4: Reserved. Return zero when read. Bit 3: PRTPME. Printer port auto power management enable. =0 =1 =0 =1 =0 =1 =0 =1 disable the auto power management functions. enable the auto power management functions. disable the auto power management functions. enable the auto power management functions. disable the auto power management functions. enable the auto power management functions. disable the auto power management functions. enable the auto power management functions.
Bit 2: FDCPME. FDC auto power management enable.
Bit 1: URAPME. UART A auto power management enable.
Bit 0: URBPME. UART B auto power management enable.
-107-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
CRF1 (Default 0x00)
Bit 7: WAK_STS. This bit is set when the chip is in the sleeping state and an enabled resume event occurs. Upon setting this bit, the sleeping/working state machine will transition the system to the working state. This bit is only set by hardware and is cleared by writing a 1 to this bit position or by the sleeping/working state machine automatically when the global standby timer expires. =0 =1 the chip is in the sleeping state. the chip is in the working state.
Bit 6: Device's trap status. Bit 5 - 4: Reserved. Return zero when read. Bit 3 - 0: Devices' trap status. These bits of trap status indicate that the individual device Wakes-Up due to any I/O access, IRQ, and external input to the device. The device's idle timer reloads the preset expiry depending on which device wakes up. These 5 bits are controlled by the UART C, printer port, FDC, UART A and UART B power down machines respectively . Writing a 1 clears this bit and writing a 0 has no effect. Note that: the user is not supposed to change the status while power management function is enabled. Bit 6: URCTRAPSTS. UART C trap status. =0 =1 UART C is now in the sleeping state. UART C is now in the working state due to any UART C access, any IRQ, the receiver begins receiving a start bit, the transmitter shift register begins transmitting a start bit, and any transition on MODEM control input lines. the printer port is now in the sleeping state. the printer port is now in the workinging state due to any printer port access, any IRQ, any DMA acknowledge, and any transition on BUSY, ACK#, PE, SLCT, and ERR# pins. FDC is now in the sleeping state. FDC is now in the working state due to any FDC access, any IRQ, any DMA acknowledge, and any enabling of the motor enable bits in the DOR register. UART A is now in the sleeping state. UART A is now in the working state due to any UART A access, any IRQ, the receiver begins receiving a start bit, the transmitter shift register begins transmitting a start bit, and any transition on MODEM control input lines. UART B is now in the sleeping state. UART B is now in the workinging state due to any UART B access, any IRQ, the receiver begins receiving a start bit, the transmitter shift register begins transmitting a start bit, and any transition on MODEM control input lines.
-108-
Bit 3: PRTTRAPSTS. Printer port trap status. =0 =1
Bit 2: FDCTRAPSTS. FDC trap status. =0 =1
Bit 1: URATRAPSTS. UART A trap status. =0 =1
Bit 0: URBTRAPSTS. UART B trap status. =0 =1
W83977EF-AW/W83977EG-AW
CRF3 (Default 0x00)
Bit 7: Reserved. Return zero when read. Bit 6 - 0: Device's IRQ status. These bits indicate the IRQ status of the individual device respectively. The device's IRQ status bit is set by their source device and is cleared by writing a 1. Writing a 0 has no effect. Bit 6: URCIRQSTS. UART C IRQ status. Bit 5: MOUIRQSTS. MOUSE IRQ status. Bit 4: KBCIRQSTS. KBC IRQ status. Bit 3: PRTIRQSTS. printer port IRQ status. Bit 2: FDCIRQSTS. FDC IRQ status. Bit 1: URAIRQSTS. UART A IRQ status. Bit 0: URBIRQSTS. UART B IRQ status.
CRF4 (Default 0x00)
Bit 7 - 5: Reserved. Return zero when read. Bit 3: Reserved. Return zero when read. Bit 4 and Bit 2 - 0:These bits indicate the status of the individual GPIO function respectively. The status is set by their source function and is cleared by writing a 1. Writing a 0 has no effect. Bit 4: WDTIRQSTS. Watch dog timer IRQ status at logical device 8. Bit 2: COMIRQSTS. Common IRQ status of GP20 - GP25 at logical device 8. Bit 1: GP11IRQSTS. GP11 interrupt steering status at logical device 7. Bit 0: GP10IRQSTS. GP10 interrupt steering status at logical device 7.
CRF6 (Default 0x00)
Bit 7: Reserved. Return zero when read. Bit 6 - 0: Enable bits of the SMI#/SCI# generation due to the device's IRQ. These bits enable the generation of an SMI#/SCI# interrupt due to any IRQ of the devices. SMI#/SCI# logic output = (URBIRQEN and URBIRQSTS) or (URAIRQEN and URAIRQSTS) or (FDCIRQEN and FDCIRQSTS) or (PRTIRQEN and PRTIRQSTS) or (KBCIRQEN and KBCIRQSTS) or (MOUIRQEN and MOUIRQSTS) or (URCIRQEN and URCIRQSTS) or (WDTIRQEN and WDTIRQSTS) or (COMIRQEN and COMIRQSTS) or (GP11IRQEN and GP11IRQSTS) or (GP10IRQEN and GP10IRQSTS) Bit 6: URCIRQEN. =0 disable the generation of an SMI#/SCI# =1 enable the generation of an SMI#/SCI# Bit 5: MOUIRQEN. =0 disable the generation of an SMI#/SCI# =1 enable the generation of an SMI#/SCI# Bit 4: KBCIRQEN. =0 disable the generation of an SMI#/SCI# =1 enable the generation of an SMI#/SCI# interrupt due to UART C's IRQ. interrupt due to UART C's IRQ. interrupt due to MOUSE's IRQ. interrupt due to MOUSE's IRQ. interrupt due to KBC's IRQ. interrupt due to KBC's IRQ.
Publication Release Date: Apr. 2006 Revision 1.2
-109-
W83977EF-AW/W83977EG-AW
Bit 3: PRTIRQEN. =0 disable the generation of an SMI#/SCI# =1 enable the generation of an SMI#/SCI# Bit 2: FDCIRQEN. =0 disable the generation of an SMI#/SCI# =1 enable the generation of an SMI#/SCI# Bit 1: URAIRQEN. =0 disable the generation of an SMI#/SCI# =1 enable the generation of an SMI#/SCI# Bit 0: URBIRQEN. =0 disable the generation of an SMI#/SCI# =1 enable the generation of an SMI#/SCI#
CRF7 (Default 0x00) Bit 7 - 5: Reserved. Return zero when read. Bit 3: Reserved. Return zero when read. Bit 4 and Bit 2 - 0:Enable bits of the SMI#/SCI# functions. Bit 4: WDTIRQEN. =0 disable the generation of an SMI#/SCI# =1 enable the generation of an SMI#/SCI# Bit 2: COMIRQEN. =0 disable the generation of an SMI#/SCI# =1 enable the generation of an SMI#/SCI# Bit 1: GP11IRQEN.
interrupt due to printer port's IRQ. interrupt due to printer port's IRQ. interrupt due to FDC's IRQ. interrupt due to FDC's IRQ. interrupt due to UART A's IRQ. interrupt due to UART A's IRQ. interrupt due to UART B's IRQ. interrupt due to UART B's IRQ.
generation due to the individual GPIO IRQ
interrupt due to watch dog timer's IRQ. interrupt due to watch dog timer's IRQ. interrupt due to common IRQ function's IRQ. interrupt due to common IRQ function's IRQ.
=0 =1 =0 =1
disable the generation of an SMI#/SCI# interrupt due to GP11 interrupt steering's IRQ. enable the generation of an SMI#/SCI# interrupt due to GP11 interrupt steering's IRQ. disable the generation of an SMI#/SCI# interrupt due to GP10 interrupt steering's IRQ. enable the generation of an SMI#/SCI# interrupt due to GP10 interrupt steering's IRQ.
Bit 0: GP10IRQEN.
CRF9 (Default 0x00)
Bit 7 - 3: Reserved. Return zero when read. Bit 2: SCI_EN: Select the power management events to be either an SCI# OR SMII# interrupt for the IRQ events. Note that: this bit is valid only when SMISCI_OE = 1. =0 =1 =0 =1 the power management events will generate an SMI# event. the power management events will generate an SCI# event. 1 second. 8 milli-seconds.
Bit 1: FSLEEP: This bit selects the fast expiry time of individual devices
-110-
W83977EF-AW/W83977EG-AW
Bit 0: SMISCI_OE: This is the SMI# and SCI# enable bit. =0 =1 neither SMI# nor SCI# will be generated. Only the IRQ status bit is set. an SMI# or SCI# event will be generated.
CRFE, FF (Default 0x00)
Reserved for Winbond test.
-111-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
13. SPECIFICATIONS
13.1 Absolute Maximum Ratings
PARAMETER RATING UNIT
Power Supply Voltage Input Voltage Battery Voltage VBAT 5V Standby VSB Operating Temperature Storage Temperature
-0.5 to 7.0 -0.5 to VDD+0.5 4.0 to 1.8 4.5 to 5.5 0 to +70 -55 to +150
V V V V
C C
Note: Exposure to conditions beyond those listed under Absolute Maximum Ratings may adversely affect the life and reliability of the device.
13.2 DC CHARACTERISTICS
(Ta = 0 C to 70 C, VDD = 5V 10%, VSS = 0V)
PARAMETER SYM. MIN. TYP. MAX. UNIT CONDITIONS
Battery Quiescent Current Stand-by Power Supply Quiescent Current Input Low Voltage Input High Voltage Output Low Voltage Output High Voltage Input High Leakage Input Low Leakage Input Low Voltage Input High Voltage Output Low Voltage Output High Voltage Input High Leakage Input Low Leakage
IBAT IVSB
1
uA mA
VBAT = 2.5 V VSB = 5.0 V, All ACPI pins are not connected.
2.0
I/O8t - TTL level bi-directional pin with source-sink capability of 8 mA
VIL VIH VOL VOH ILIH ILIL VIL VIH VOL VOH ILIH ILIL 2.4 2.0 2.4 2.0
0.8 0.4 +10 -10 0.8 0.4 +10 -10
V V V V
A A
IOL = 8 mA IOH = - 8 mA VIN = VDD VIN = 0V
I/O6t - TTL level bi-directional pin with source-sink capability of 6 mA
V V V V
A A
IOL = 6 mA IOH = - 6 mA VIN = VDD VIN = 0V
-112-
W83977EF-AW/W83977EG-AW
DC CHARACTERISTICS, continued
PARAMETER
SYM.
MIN.
TYP.
MAX.
UNIT
CONDITIONS
I/O8 - CMOS level bi-directional pin with source-sink capability of 8 mA
Input Low Voltage Input High Voltage Output Low Voltage Output High Voltage Input High Leakage Input Low Leakage Input Low Voltage Input High Voltage Output Low Voltage Output High Voltage Input High Leakage Input Low Leakage
VIL VIH VOL VOH ILIH ILIL VIL VIH VOL VOH ILIH ILIL 3.5 0.7xVDD 3.5 0.7xVDD
0.3xVDD 0.4 + 10 - 10 0.3xVDD 0.4 + 10 - 10
V V V V
A A
IOL = 8 mA IOH = - 8 mA VIN = VDD VIN = 0V
I/O12 - CMOS level bi-directional pin with source-sink capability of 12 mA
V V V V
A A
IOL = 12 mA IOH = - 12 mA VIN = VDD VIN = 0V
I/O16u - CMOS level bi-directional pin with source-sink capability of 16 mA, with internal pullup resistor
Input Low Voltage Input High Voltage Output Low Voltage Output High Voltage Input High Leakage Input Low Leakage
VIL VIH VOL VOH ILIH ILIL 3.5 0.7xVDD
0.3xVDD 0.4 + 10 - 10
V V V V
A A
IOL = 16 mA IOH = - 16 mA VIN = VDD VIN = 0V
I/OD16u - CMOS level Open-Drain pin with source-sink capability of 16 mA, with internal pullup resistor
Input Low Voltage Input High Voltage Output Low Voltage Output High Voltage Input High Leakage Input Low Leakage
VIL VIH VOL VOH ILIH ILIL 3.5 0.7xVDD
0.3xVDD 0.4 + 10 - 10
V V V V
A A
IOL = 16 mA IOH = - 16 mA VIN = VDD VIN = 0V
-113-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
DC CHARACTERISTICS, continued
PARAMETER
SYM.
MIN.
TYP.
MAX.
UNIT
CONDITIONS
I/O12t - TTL level bi-directional pin with source-sink capability of 12 mA
Input Low Voltage Input High Voltage Output Low Voltage Output High Voltage Input High Leakage Input Low Leakage Input Low Voltage Input High Voltage Output Low Voltage Output High Voltage Input High Leakage Input Low Leakage Output Low Voltage Output High Voltage Output Low Voltage Output High Voltage Output Low Voltage Output Low Voltage Input Low Voltage Input High Voltage Input High Leakage Input Low Leakage
VIL VIH VOL VOH ILIH ILIL VIL VIH VOL VOH ILIH ILIL VOL VOH VOL VOH VOL VOL VIL VIH ILIH ILIL 2.0 2.4 2.4 2.4 2.0 2.4 2.0
0.8 0.4 + 10 - 10 0.8 0.4 + 10 - 10 0.4
V V V V
A A
IOL = 12 mA IOH = - 12 mA VIN = VDD VIN = 0V
I/O24t - TTL level bi-directional pin with source-sink capability of 24 mA
V V V V
A A
IOL = 24 mA IOH = - 24 mA VIN = VDD VIN = 0V IOL = 8 mA IOH = - 8 mA IOL = 12 mA IOH = -12 mA IOL = 12 mA IOL = 24 mA
OUT8t - TTL level output pin with source-sink capability of 8 mA
V V
OUT12t - TTL level output pin with source-sink capability of 12 mA
0.4
V V
OD12 - Open-drain output pin with sink capability of 12 mA
0.4 0.4 0.8 +10 -10
V V V V
A A
OD24 - Open-drain output pin with sink capability of 24 mA INt - TTL level input pin
VIN = VDD VIN = 0 V
-114-
W83977EF-AW/W83977EG-AW
DC CHARACTERISTICS, continued
PARAMETER
INc
SYM. VIL VIH ILIH ILIL VtVt+ VTH ILIH ILIL VIL VIH ILIH ILIL VtVt+ VTH ILIH ILIL VtVt+ VTH ILIH ILIL
MIN.
TYP.
MAX. 0.3xVDD
UNIT V V
A A
CONDITIONS
- CMOS level input pin
Input Low Voltage Input High Voltage Input High Leakage Input Low Leakage
INcs
0.7xVDD +10 -10 1.3 3.2 1.5 1.5 3.5 2 +10 -10 0.7xVDD 0.7xVDD +10 -10 0.5 1.6 0.5 0.8 2.0 1.2 +10 -10 0.5 1.6 0.5 0.8 2.0 1.2 +10 -10 1.1 2.4 1.1 2.4 1.7 3.8
VIN = VDD VIN = 0 V VDD = 5 V VDD = 5 V VDD = 5 V VIN = VDD VIN = 0 V
- CMOS level Schmitt-triggered input pin
Input Low Threshold Voltage Input High Threshold Voltage Hystersis Input High Leakage Input Low Leakage Input Low Voltage Input High Voltage Input High Leakage Input Low Leakage
INts
V V V
A A
INcu - CMOS level input pin with internal pull-up resistor
V V
A A
VIN = VDD VIN = 0 V VDD = 5 V VDD = 5 V VDD = 5 V VIN = VDD VIN = 0 V VDD = 5 V VDD = 5 V VDD = 5 V VIN = VDD VIN = 0 V
- TTL level Schmitt-triggered input pin
Input Low Threshold Voltage Input High Threshold Voltage Hystersis Input High Leakage Input Low Leakage
INtsu
V V V
A A
- TTL level Schmitt-triggered input pin with internal pull-up resistor
Input Low Threshold Voltage Input High Threshold Voltage Hystersis Input High Leakage Input Low Leakage
V V V
A A
-115-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
13.3 AC Characteristics
13.3.1 FDC: Data rate = 1 MB, 500 KB, 300 KB, 250 KB/sec.
PARAMETER SYM. TEST CONDITIONS MIN. TYP.
(NOTE 1)
MAX.
UNIT
SA9-SA0, AEN, DACK#, CS#, setup time to IOR# SA9-SA0, AEN, DACK#, hold time for IOR#
IOR width
TAR TAR TRR TFD TDH TDF TRI TAW TWA TWW TDW TWD TWI TMCY TAM TMA TAA TMR
TMW
25 0 80 CL = 100 pf CL = 100 pf CL = 100 pf 10 10 50 360/570 /675 25 0 60 60 0 360/570 /675 27 50 0 260/430 /510
0 0
nS nS nS 80 nS nS nS nS nS nS nS nS nS nS
S
Data access time from IOR# Data hold from IOR# SD to from IOR# IRQ delay from IOR# SA9-SA0, AEN, DACK#, setup time to IOW# SA9-SA0, AEN, DACK#, hold time for IOW# IOW# width Data setup time to IOW# Data hold time from IOW# IRQ delay from IOW# DRQ cycle time DRQ delay time DACK# DRQ to DACK# delay DACK# width IOR# delay from DRQ
IOW# delay from DRQ
nS nS nS
nS nS
-116-
W83977EF-AW/W83977EG-AW
AC Characteristics, FDC continued
PARAMETER
SYM.
TEST CONDITIONS
MIN.
TYP. (NOTE 1)
MAX.
UNIT
IOW# or IOR# response time from DRQ TC width RESET width INDEX# width DIR# setup time to STEP# DIR# hold time from STEP# STEP# pulse width STEP# cycle width WD# pulse width Write precompensation
Notes:
TMRW TTC TRST TIDX TDST TSTD TSTP TSC TWDD TWPC 135/220 /260 1.8/3/3. 5 0.5/0.9 /1.0 1.0/1.6 /2.0 24/40/4 8 6.8/11.5 /13.8 Note 2 100/185 /225 100/138 /225
6/12 /20/24
S
nS
S S S S
7/11.7 /14 Note 2 125/210 /250 125/210 /250
7.2/11.9 /14.2 Note 2 150/235 /275 150/235 /275
S S S S
1. Typical values for T = 25 C and normal supply voltage. 2. Programmable from 2 mS through 32 mS in 2 mS increments.
-117-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
13.3.2 UART/Parallel Port
PARAMETER SYMBOL TEST CONDITIONS MIN. MAX. UNIT
Delay from Stop to Set Interrupt Delay from IOR# Reset Interrupt Delay from Initial IRQ Reset to Transmit Start Delay from IOW# to Reset interrupt Delay from Initial IOW# to interrupt Delay from Stop to Set Interrupt Delay from IOR# to Reset Interrupt Delay from IOR# to Output Set Interrupt Delay from Modem Input Reset Interrupt Delay from IOR# Interrupt Active Delay Interrupt Inactive Delay Baud Divisor
TSINT TRINT TIRS THR TSI TSTI TIR TMWO TSIM TRIM TIAD TIID
N
9/16 100 pf Loading 1/16 100 pf Loading 9/16 1 8/16 175 16/16 1/2 100 pF Loading 100 pF Loading 250 200 250 250 100 pF Loading 100 pF Loading 100 pF Loading 25 30 2 -1
16
Baud Rate
S
Baud Rate nS Baud Rate Baud Rate nS nS nS nS nS nS
13.3.3
Parallel Port Mode Parameters
SYM. t1 t2 t3 t4 t5 200 MIN. TYP. MAX. 100 60 105 300 105 UNIT nS nS nS nS nS
PARAMETER PD0-7, INDEX#, STROBE#, AUTOFD# Delay from IOW# IRQ Delay from ACK#, nFAULT IRQ Delay from IOW# IRQ Active Low in ECP and EPP Modes ERROR# Active to IRQ Active
-118-
W83977EF-AW/W83977EG-AW
13.3.4 EPP Data or Address Read Cycle Timing Parameters
PARAMETER SYM. MIN. MAX. UNIT
Ax Valid to IOR# Asserted IOCHRDY Deasserted to IOR# Deasserted IOR# Deasserted to Ax Valid IOR# Deasserted to IOW# or IOR# Asserted IOR# Asserted to IOCHRDY Asserted PD Valid to SD Valid IOR# Deasserted to SD Hi-Z (Hold Time) SD Valid to IOCHRDY Deasserted WAIT# Deasserted to IOCHRDY Deasserted PD Hi-Z to PDBIR Set WRITE# Deasserted to IOR# Asserted WAIT# Asserted to WRITE# Deasserted Deasserted to WRITE# Modified IOR# Asserted to PD Hi-Z WAIT# Asserted to PD Hi-Z Command Asserted to PD Valid Command Deasserted to PD Hi-Z WAIT# Deasserted to PD Drive WRITE# Deasserted to Command PBDIR Set to Command PD Hi-Z to Command Asserted Asserted to Command Asserted WAIT# Deasserted to Command Deasserted Time out PD Valid to WAIT# Deasserted PD Hi-Z to WAIT# Deasserted
t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28
40 0 10 40 0 0 0 0 60 0 0 0 60 0 60 0 0 60 1 0 0 0 60 10 0 0 20 30 195 180 12 190 185 190 50 180 24 75 40 85 160 10
nS nS nS nS nS
S
nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS
S
-119-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
13.3.5 EPP Data or Address Write Cycle Timing Parameters
PARAMETER SYM. MIN. MAX. UNIT
Ax Valid to IOW# Asserted SD Valid to Asserted IOW# Deasserted to Ax Invalid WAIT# Deasserted to IOCHRDY Deasserted Command Asserted to WAIT# Deasserted IOW# Deasserted to IOW# or IOR# Asserted IOCHRDY Deasserted to IOW# Deasserted WAIT# Asserted to Command Asserted IOW# Asserted to WAIT# Asserted PBDIR Low to WRITE# Asserted WAIT# Asserted to WARIT# Asserted WAIT# Asserted to WRITE# Change IOW# Asserted to PD Valid WAIT# Asserted to PD Invalid PD Invalid to Command Asserted IOW# to Command Asserted WAIT# Asserted to Command Asserted WAIT# Deasserted to Command Deasserted Command Asserted to WAIT# Deasserted Time out Command Deasserted to WAIT# Asserted IOW# Deasserted to WRITE# Deasserted and PD invalid
t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22
40 10 10 0 10 40 0 60 0 0 60 60 0 0 10 5 60 60 0 10 0 0 35 210 190 10 12 185 185 50 24 160 70
nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS
S S
nS nS
-120-
W83977EF-AW/W83977EG-AW
13.3.6 Parallel Port FIFO Timing Parameters
PARAMETER SYMBOL MIN. MAX. UNIT
DATA Valid to nSTROBE Active nSTROBE Active Pulse Width DATA Hold from nSTROBE Inactive BUSY Inactive to PD Inactive BUSY Inactive to nSTROBE Active nSTROBE Active to BUSY Active
t1 t2 t3 t4 t5 t6
600 600 450 80 680 500
nS nS nS nS nS nS
13.3.7
ECP Parallel Port Forward Timing Parameters
PARAMETER SYMBOL MIN. MAX. UNIT
nAUTOFD Valid to nSTROBE Asserted PD Valid to nSTROBE Asserted BUSY Deasserted to nAUTOFD Changed BUSY Deasserted to PD Changed nSTROBE Deasserted to BUSY Deasserted BUSY Deasserted to nSTROBE Asserted nSTROBE Asserted to BUSY Asserted BUSY Asserted to nSTROBE Deasserted
t1 t2 t3 t4 t5 t6 t7 t8
0 0 80 80 0 80 0 80
60 60 180 180 200 180
nS nS nS nS nS nS nS nS
13.3.8
ECP Parallel Port Reverse Timing Parameters
PARAMETER SYMBOL MIN. MAX. UNIT
PD Valid to nACK Asserted nAUTOFD Deasserted to PD Changed nAUTOFD Asserted to nACK Asserted nAUTOFD Deasserted to nACK Deasserted nACK Deasserted to nAUTOFD Asserted PD Changed to nAUTOFD Deasserted
t1 t2 t3 t4 t5 t6
0 0 0 0 80 80 200 200
nS nS nS nS nS nS
-121-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
13.3.9
NO.
KBC Timing Parameters
DESCRIPTION MIN. MAX. UNIT
T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15 T16 T17 T18 T19 T20 T21 T22 T23 T24 T25 T26 T27 T28 T29
Address Setup Time from WRB Address Setup Time from RDB WRB Strobe Width RDB Strobe Width Address Hold Time from WRB Address Hold Time from RDB Data Setup Time Data Hold Time Gate Delay Time from WRB RDB to Drive Data Delay RDB to Floating Data Delay Data Valid After Clock Falling (SEND) K/B Clock Period K/B Clock Pulse Width Data Valid Before Clock Falling (RECEIVE) K/B ACK After Finish Receiving RC Fast Reset Pulse Delay (8 Mhz) RC Pulse Width (8 Mhz) Transmit Timeout Data Valid Hold Time Input Clock Period (6-12 Mhz) Duration of CLK inactive Duration of CLK active Time from inactive CLK transition, used to time when the auxiliary device sample DATA Time of inhibit mode Time from rising edge of CLK to DATA transition Duration of CLK inactive Duration of CLK active Time from DATA transition to falling edge of CLK
0 0 20 20 0 0 50 0 10 0 20 10 4 20 2 6 2 0 83 30 30 5 100 5 30 30 5 167 50 50 25 300 T28-5 50 50 25 3 30 40 20 4
nS nS nS nS nS nS nS nS nS nS nS
S S S S S S S
mS
S
nS
S S S S S S S S
-122-
W83977EF-AW/W83977EG-AW
13.3.10 GPIO Timing Parameters
SYMBOL PARAMETER MIN. MAX. UNIT
tWGO
Write data to GPIO update
300(Note 1)
ns
Note : Refer to Microprocessor Interface Timing for Read Timing.
13.3.11 Keyboard/Mouse Timing Parameters
SYMBOL PARAMETER
PANSWIN# falling edge to PANSWOUT# falling edge
MIN.
MAX.
UNIT
tSWL tSWH tWKUPD tWKUPW
20 50 200 0.5 1
ns ns ns sec
PANSWIN# falling edge to PANSWOUT# Hi-Z KCLK/MCLK falling edge to PANSWOUT# falling edge delay PANSWOUT# active pulse width
-123-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
14. TIMING WAVEFORMS
14.1 14.1 FDC
Processor Read Operation
SA0-SA9 AEN CS# DACK# IOR# TFD TDF D0-D7 TR IRQ TIDX INDEX# TAR TRR TDH TRA WD#
Write Date
TWDD
Index
TIDX
Processor Write Operation
SA0-SA9 AEN DACK# IOW# TWD D0-D7 TAW TWW TWA TC
Terminal Count
TTC
Reset RESET
TDW
IRQ
TWI
TRST
DMA Operation
Drive Seek operation
DRQ
TAM TMCY DIR#
DACK# IOW# or IOR#
TMA TMRW
TAA TDST STEP
TSTP
TSTD
TMW (IOW#) TMR (IOR#)
TSC
-124-
W83977EF-AW/W83977EG-AW
14.2 UART/Parallel
Receiver Timing
SIN (RECEIVER INPUT DATA) STAR DATA BITS (5-8 PARITY STOP TSINT TRINT
IRQ3 or IRQ4 IOR (READ RECEIVER BUFFER REGISTER)
Transmitter Timin
SERIAL OUT (SOUT) THRS IRQ3 or IRQ4 THR IOW (WRITE THR) THR TSI TIR IOR (READ TIR) STAR DATA (5-8) PARITY STOP (1-2) STAR TSTI
-125-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
14.2.1 Modem Control Timing
MODEM Control Timing
IOW# (WRITE MCR)
RTS#,DTR#


CTS#,DSR# DCD# IRQ3 or IRQ4 IOR# (READ MSR) RI#
?
TMWO



TMWO

TSIM


TRIM

TSIM
TRIM TSIM
?


Printer Interrupt Timing

ACK#
IRQ7

TLAD

TLID
-126-
W83977EF-AW/W83977EG-AW
14.3 Parallel Port
14.3.1 Parallel Port Timing
IOW# t1 INIT#, STROBE# AUTOFD, SLCTIN# PD<0:7> ACK# t2 IRQ (SPP) IRQ (EPP or ECP) nFAULT (ECP) ERROR# (ECP) t5 t2 IRQ t4 t3 t4
-127-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
14.3.2 EPP Data or Address Read Cycle (EPP Version 1.9)
t3 A<0:10> IOR t1 t6 SD<0:7> t8 t5 IOCHRDY t10 t9 t2 t7 t4
t13 t14 WRITE# t16 t17 PD<0:7> t21 ADDRSTB DATASTB t22 t23 t25 t24
t15
t18
t19
t20
t26
t27
t28
WAIT#
-128-
W83977EF-AW/W83977EG-AW
14.3.3 EPP Data or Address Write Cycle (EPP Version 1.9)
t3 t4 A10-A0 SD<0:7> t1 IOW# IOCHRDY t9 t10 t11 t13 t15 t16 t17 t2 t7 t8 t5 t6
WRITE# PD<0:7>
t12 t14
DATAST# ADDRSTB#
t18
t19 t20
t21
WAIT# PBDIR
t22
-129-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
14.3.4 EPP Data or Address Read Cycle (EPP Version 1.7)
t3 A<0:10> IOR SD<0:7> t8 t5 IOCHRDY t10 t9 t1 t6 t7 t2 t4
t13 t14 WRITE# t16 t17 PD<0:7> t21 ADDRSTB DATASTB t22 t23 t25 t24 t18
t15
t19
t20
t26
t27
t28
WAIT#
-130-
W83977EF-AW/W83977EG-AW
14.3.5 EPP Data or Address Write Cycle (EPP Version 1.7)
t3 t4 A10-A0 SD<0:7> t1 IOW# IOCHRDY t9 t10 t11 t13 t15 t16 t17 t2 t7 t8 t5 t6
WRITE# PD<0:7>
t22 t22
DATAST# ADDRSTB#
t18
t19 t20
WAIT#
14.3.6
Parallel Port FIFO Timing
t4 t3 >| >|
PD<0:7> t1 nSTROBE >| t2 > t5 >|
t6 BUSY
>|
-131-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
14.3.7 ECP Parallel Port Forward Timing
t3 nAUTOFD t4 PD<0:7> t1 t2 t6 nSTROBE t5 BUSY t7 t5 t8
14.3.8
ECP Parallel Port Reverse Timing
t2 PD<0:7> t1 t3 nACK t5 nAUTOFD t6 t5
t4
-132-
W83977EF-AW/W83977EG-AW
14.4 KBC
14.4.1 Write Cycle Timing
A2, CSB
T1 T3 ACTIVE T7 T8 T5
WRB
D0~D7 GA20 OUTPUT PORT FAST RESET PULSE RC FE COMMAND
DATA IN T9
T17
T18
14.4.2
Read Cycle Timing
A2,CSB AEN
T2 T4 T6
RDB
ACTIVE T10 T11 DATA OUT
D0-D7
Send Data to K/B
CLOCK (KCLK) SERIAL DATA (KDAT)
T12 START D0 D1 D2
T14 D3
T13 D4 T19 D5 D6 D7 P STOP
T16
-133-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
14.4.3 Receive Data from K/B
CLOCK (KCLK)
T15
T14 D0 D1 D2 D3 D4
T13 D5 D6 D7 P
SERIAL DATA (T1)
START T20
STOP
14.4.4
Input Clock
CLOCK CLOCK T21
14.4.5
Send Data to Mouse
MCLK
T25 T22 T23 T24
MDAT
START Bit
D0
D1
D2
D3
D4
D5
D6
D7
P
STOP Bit
14.4.6
Receive Data from Mouse
MCLK
T29 T26 T27 T28
MDAT
START
D0
D1
D2
D3
D4
D5
D6
D7
P
STOP Bit
-134-
W83977EF-AW/W83977EG-AW
14.5 GPIO Write Timing Diagram
A0-A15 IOW# D0-7 GPIO10-17 GPIO20-25
PREVIOUS STATE
VALID
VALID VALID tWGO
14.5.1
Master Reset (MR) Timing
Vcc
tVMR
MR
14.6 Keyboard/Mouse Wake-up Timing
KCLK MCLK PANSWIN#
PANSWOUT# HI-Z tWKUPD tSWL tSWZ
tWKUPW
-135-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
15. APPLICATION CIRCUITS
15.1 Parallel Port Extension FDD
JP13
WE2#/SLCT WD2#/PE MOB2#/BUSY DSB2#/ACK PD7 PD6 PD5 DCH2#/PD4 RDD2#/PD3 STEP2#/SLIN# WP2#/PD2 DIR2#/INIT# TRK02#/PD1 HEAD2#/ERR# IDX2#/PD0 RWC2#/AFD# STB# 13 25 12 24 11 23 10 22 9 21 8 20 7 19 6 18 5 17 4 16 3 15 2 14 1
JP 13A
DCH2# HEAD2# RDD2#
WP2#
TRK02# WE2# WD2# STEP2# DIR2# MOB2# DSB2# IDX2#
RWC2#
34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2
33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1
EXT FDC
PRINTER PORT
Parallel Port Extension FDD Mode Connection Diagram
-136-
W83977EF-AW/W83977EG-AW
15.2 Parallel Port Extension 2FDD
JP13
W E2#/SLCT W D 2#/PE M O B2#/BU SY D SB2#/AC K D SA2#/PD 7 M O A2#/PD 6 PD 5 D C H 2#/PD 4 R D D 2#/PD 3 STEP2#/SLIN # W P2#/PD 2 DIR2#/IN IT# TR K02#/PD 1# H EAD 2#/ER R # ID X2#/PD 0 R W C 2#/AFD # STB# 13 25 12 24 11 23 10 22 9 21 8 20 7 19 6 18 5 17 4 16 3 15 2 14 1
JP 13A
DC H2# HE AD 2# RD D2#
W P 2#
TR K02# W E2# W D2# ST EP2# DIR2 # M O B 2# DS A2# DS B2# M O A 2# ID X2#
RW C 2#
34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2
33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1
EX T FDC
PR IN TER P O R T
Parallel Port Extension 2FD D C onnection D iagram
15.3 Four FDD Mode
W83977EF DSA# DSB# MOA# MOB# G2 A2 B2 74LS139 G1 A1 B1 1Y0 1Y1 1Y2 1Y3 2Y0 2Y1 2Y2 2Y3 7407(2) DSA# DSB# DSC# DSD# MOA# MOB# MOC# MOD#
-137-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
16. ORDERING INFORMATION
PART NO. KBC FIRMWARE REMARKS
W83977EF-AW
AMIKEY
TM
-2
with OnNow / security keyboard Wake-Up
17. HOW TO READ THE TOP MARKING
Example: The top marking of W83977EF-AW
inbond
W83977EF-AW
(c) AM. MEGA. 87-96 821A2B282012345
inbond
W83977EF-AW W83977EG-AW
(c) AM. MEGA. 87-96 821A2B282012345
1st line: Winbond logo 2nd line: the type number: W83977EF-AW,W83977EG-AW(Pb-free package) 3rd line: the source of KBC F/W -- American Megatrends IncorporatedTM 4th line: the tracking code 821 A 2 C 282012345 821: packages made in '98, week 21 A: assembly house ID; A means ASE, S means SPIL.... etc. 2: Winbond internal use. B: IC revision; A means version A, B means version B 282012345: wafer production series lot number
-138-
W83977EF-AW/W83977EG-AW
18. PACKAGE DIMENSIONS
(128-pin PQFP)
HE E
102 65
Symbol
Dimension in mm
Dimension in inch
Min
0.25 2.57 0.10 0.10 13.90 19.90
Nom
0.35 2.72 0.20 0.15 14.00 20.00 0.50
Max
0.45 2.87 0.30 0.20 14.10 20.10
Min
0.010 0.101 0.004 0.004 0.547 0.783
Nom
0.014 0.107 0.008 0.006 0.551 0.787 0.020
Max
0.018 0.113 0.012 0.008 0.555 0.791
103
64
D
HD
128
39
1
e
b
38
A1 A2 b c D E e HD HE L L1 y 0
c
17.00 23.00 0.65
17.20 23.20 0.80 1.60
17.40 23.40 0.95
0.669 0.905 0.025
0.677 0.913 0.031 0.063
0.685 0.921 0.037
0.08 0 7 0
0.003 7
Note:
1.Dimension D & E do not include interlead flash. 2.Dimension b does not include dambar protrusion/intrusion . 3.Controlling dimension : Millimeter 4.General appearance spec. should be based on final visual inspection spec.
A A2 See Detail F Seating Plane A1 L L1 Detail F
y
5. PCB layout please use the "mm".
-139-
Publication Release Date: Apr. 2006 Revision 1.2
W83977EF-AW/W83977EG-AW
Important Notice
Winbond products are not designed, intended, authorized or warranted for use as components in systems or equipment intended for surgical implantation, atomic energy control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments, combustion control instruments, or for other applications intended to support or sustain life. Further more, Winbond products are not intended for applications wherein failure of Winbond products could result or lead to a situation wherein personal injury, death or severe property or environmental damage could occur. Winbond customers using or selling these products for use in such applications do so at their own risk and agree to fully indemnify Winbond for any damages resulting from such improper use or sales.
-140-


▲Up To Search▲   

 
Price & Availability of W83977EG

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X